From ff5d5b24977c0cf9c7ba3a9fcc8e14ae9ccbd0f8 Mon Sep 17 00:00:00 2001 From: jca Date: Fri, 16 Oct 2015 23:00:01 +0000 Subject: [PATCH] Also allow 6 as a miblen for NET_RT_DUMP, not all users specify a rtable. ok deraadt@ --- sys/kern/kern_pledge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index 5752df12122..838e58f966a 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.39 2015/10/16 17:03:31 deraadt Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.40 2015/10/16 23:00:01 jca Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -851,7 +851,7 @@ pledge_sysctl_check(struct proc *p, int miblen, int *mib, void *new) /* routing table observation */ if ((p->p_p->ps_pledge & PLEDGE_ROUTE)) { - if (miblen == 7 && + if ((miblen == 6 || miblen == 7) && mib[0] == CTL_NET && mib[1] == PF_ROUTE && mib[2] == 0 && (mib[3] == 0 || mib[3] == AF_INET6 || mib[3] == AF_INET) && -- 2.20.1