From 0ecdc9171fe044002b3903fa0191c11b0373f26a Mon Sep 17 00:00:00 2001 From: jca Date: Sat, 17 Oct 2015 00:58:50 +0000 Subject: [PATCH] Allow a few 'get' ioctls for pledge("route"). route6d will soon use this. ok deraadt@ --- sys/kern/kern_pledge.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index 838e58f966a..1a5bdd192a6 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.40 2015/10/16 23:00:01 jca Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.41 2015/10/17 00:58:50 jca Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -1123,7 +1123,10 @@ pledge_ioctl_check(struct proc *p, long com, void *v) if ((p->p_p->ps_pledge & PLEDGE_ROUTE)) { switch (com) { case SIOCGIFADDR: + case SIOCGIFDSTADDR_IN6: case SIOCGIFFLAGS: + case SIOCGIFMETRIC: + case SIOCGIFNETMASK_IN6: case SIOCGIFRDOMAIN: case SIOCGNBRINFO_IN6: if (fp->f_type == DTYPE_SOCKET) -- 2.20.1