summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_mroute.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/ip_mroute.c')
-rw-r--r--sys/netinet/ip_mroute.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index b0490a4..94781e0 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -526,6 +526,14 @@ X_mrt_ioctl(int cmd, caddr_t data)
{
int error = 0;
+ /*
+ * Currently the only function calling this ioctl routine is rtioctl().
+ * Typically, only root can create the raw socket in order to execute
+ * this ioctl method, however the request might be coming from a prison
+ */
+ error = suser(curthread);
+ if (error)
+ return (error);
switch (cmd) {
case (SIOCGETVIFCNT):
error = get_vif_cnt((struct sioc_vif_req *)data);
OpenPOWER on IntegriCloud