diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-25 10:30:59 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-25 10:30:59 +0000 |
commit | 6b1fa2ae79b59b62098c8d6f065ed5214010e84e (patch) | |
tree | 399badacb2b1a7d9227faf3d6431068172bfc5d7 /sys | |
parent | 5502bbea71eaa06eaa15a3918dccb94622754ed2 (diff) |
ps(1) needs sysctl KERN_PROC_CWD exposed as well in the pledge "ps" set.
hit by czarkoff
Diffstat (limited to 'sys')
-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 1706f922fc5..fd1a9aeb732 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.70 2015/10/25 01:57:09 millert Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.71 2015/10/25 10:30:58 deraadt Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -896,6 +896,9 @@ pledge_sysctl_check(struct proc *p, int miblen, int *mib, void *new) if (miblen == 6 && /* kern.proc.* */ mib[0] == CTL_KERN && mib[1] == KERN_PROC) return (0); + if (miblen == 3 && /* kern.proc_cwd.* */ + mib[0] == CTL_KERN && mib[1] == KERN_PROC_CWD) + return (0); if (miblen == 2 && /* hw.physmem */ mib[0] == CTL_HW && mib[1] == HW_PHYSMEM64) return (0); |