Add SIOCSIFMTU to the wroute pledge.
authorbket <bket@openbsd.org>
Fri, 27 Jul 2018 06:15:10 +0000 (06:15 +0000)
committerbket <bket@openbsd.org>
Fri, 27 Jul 2018 06:15:10 +0000 (06:15 +0000)
This is required by, for example, slaacd(8) (which has been pledged) to
set MTU on an interface.

OK florian@, deraadt@

sys/kern/kern_pledge.c

index d2d1b0a..57f45e3 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: kern_pledge.c,v 1.237 2018/07/15 12:44:09 beck Exp $  */
+/*     $OpenBSD: kern_pledge.c,v 1.238 2018/07/27 06:15:10 bket Exp $  */
 
 /*
  * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -1256,6 +1256,10 @@ pledge_ioctl(struct proc *p, long com, struct file *fp)
                        if (fp->f_type == DTYPE_SOCKET)
                                return (0);
                        break;
+               case SIOCSIFMTU:
+                       if (fp->f_type == DTYPE_SOCKET)
+                               return (0);
+                       break;
                }
        }