diff options
author | jhb <jhb@FreeBSD.org> | 2014-10-02 21:18:16 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2014-10-02 21:18:16 +0000 |
commit | 08d8637e39fb612f67c97526df6f58f0872fb6cc (patch) | |
tree | d93ba5f009f9ca455fb6d07642c84f41e664b402 | |
parent | 424e7334fbbda2ecb68e66f7d096ab6ccb0a1ae9 (diff) | |
download | FreeBSD-src-08d8637e39fb612f67c97526df6f58f0872fb6cc.zip FreeBSD-src-08d8637e39fb612f67c97526df6f58f0872fb6cc.tar.gz |
Require p_cansched() for changing a process' protection status via
procctl() rather than p_cansee().
Submitted by: rwatson
MFC after: 3 days
-rw-r--r-- | sys/kern/sys_process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index b30e12a..d97b583 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -1240,7 +1240,7 @@ protect_setchild(struct thread *td, struct proc *p, int flags) { PROC_LOCK_ASSERT(p, MA_OWNED); - if (p->p_flag & P_SYSTEM || p_cansee(td, p) != 0) + if (p->p_flag & P_SYSTEM || p_cansched(td, p) != 0) return (0); if (flags & PPROT_SET) { p->p_flag |= P_PROTECTED; |