diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-11-25 15:53:02 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-11-25 15:53:02 +0000 |
commit | d214fed42fbec44c3ae508c53c21083c21e8d5ec (patch) | |
tree | 67b38734f2f2e564982fcc0cd279913e5940e5e7 /sys/kern | |
parent | 16eb158a55fb9b9f1e30ac308a32271d6d819fa8 (diff) |
permit kern.maxpartitions
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_pledge.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index f940a545b9e..30d7b81a8d4 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.123 2015/11/24 23:59:22 deraadt Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.124 2015/11/25 15:53:01 deraadt Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -1001,6 +1001,10 @@ pledge_sysctl(struct proc *p, int miblen, int *mib, void *new) mib[0] == CTL_KERN && mib[1] == KERN_RAWPARTITION) return (0); + if (miblen == 2 && /* kern.maxpartitions */ + mib[0] == CTL_KERN && + mib[1] == KERN_MAXPARTITIONS) + return (0); #ifdef CPU_CHR2BLK if (miblen == 3 && /* machdep.chr2blk */ mib[0] == CTL_MACHDEP && |