diff options
author | 2015-10-23 00:56:52 +0000 | |
---|---|---|
committer | 2015-10-23 00:56:52 +0000 | |
commit | 36c797f6101fcd512d44ee5af0029dd151e9c978 (patch) | |
tree | 88af55aa27dd80c074e7df8000fb1d50a5050730 | |
parent | crank libc major (diff) | |
download | wireguard-openbsd-36c797f6101fcd512d44ee5af0029dd151e9c978.tar.xz wireguard-openbsd-36c797f6101fcd512d44ee5af0029dd151e9c978.zip |
Allow hw.ncpu sysctl (a few reasons showed up in my mailbox rapidly..)
-rw-r--r-- | sys/kern/kern_pledge.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index 05ec65552f1..51384557ec0 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.64 2015/10/22 11:01:43 deraadt Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.65 2015/10/23 00:56:52 deraadt Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -901,6 +901,9 @@ pledge_sysctl_check(struct proc *p, int miblen, int *mib, void *new) if (miblen == 2 && /* setproctitle() */ mib[0] == CTL_VM && mib[1] == VM_PSSTRINGS) return (0); + if (miblen == 2 && /* hw.ncpu */ + mib[0] == CTL_HW && mib[1] == HW_NCPU) + return (0); printf("%s(%d): sysctl %d: %d %d %d %d %d %d\n", p->p_comm, p->p_pid, miblen, mib[0], mib[1], |