summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2017-08-21 14:40:08 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2017-08-21 14:40:08 +0000
commitb9e3b28de8afb5a9b2b708f59e34eed2b7ba49a8 (patch)
tree7405dde305820ccc25621d82a488a6ef3efd1484 /sys/kern
parent374ff1000419ceaf5fdef131f0bd04a0e0377a04 (diff)
Allow SIOCGIFAFLAG_IN6 and SIOCGIFALIFETIME_IN6 ioctls with
pledge("route"). These are read only and expose only minimal kernel code. slaacd(8) needs this on startup and when an interface gains the autoconf6 flag to get lifetime and autoconf information about already configured addresses. OK deraadt
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_pledge.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c
index 4785ee7caaa..7ccbe8f3941 100644
--- a/sys/kern/kern_pledge.c
+++ b/sys/kern/kern_pledge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_pledge.c,v 1.217 2017/07/28 02:14:56 rob Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.218 2017/08/21 14:40:07 florian Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -1305,6 +1305,8 @@ pledge_ioctl(struct proc *p, long com, struct file *fp)
if ((p->p_p->ps_pledge & PLEDGE_ROUTE)) {
switch (com) {
case SIOCGIFADDR:
+ case SIOCGIFAFLAG_IN6:
+ case SIOCGIFALIFETIME_IN6:
case SIOCGIFDESCR:
case SIOCGIFFLAGS:
case SIOCGIFMETRIC: