From: deraadt Date: Fri, 23 Oct 2015 00:56:52 +0000 (+0000) Subject: Allow hw.ncpu sysctl (a few reasons showed up in my mailbox rapidly..) X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=36c797f6101fcd512d44ee5af0029dd151e9c978;p=openbsd Allow hw.ncpu sysctl (a few reasons showed up in my mailbox rapidly..) --- 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 @@ -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],