diff options
author | jhb <jhb@FreeBSD.org> | 2002-05-19 00:14:50 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-05-19 00:14:50 +0000 |
commit | b6d6774e76bd44035dc47ff6e7c3fdb44961a142 (patch) | |
tree | 0642e3c6447c397fe8442630e46788930550bb42 /sys/kern/kern_proc.c | |
parent | 930f7599edae9acfd7bada4b5e71817067c0ec88 (diff) | |
download | FreeBSD-src-b6d6774e76bd44035dc47ff6e7c3fdb44961a142.zip FreeBSD-src-b6d6774e76bd44035dc47ff6e7c3fdb44961a142.tar.gz |
Change p_can{debug,see,sched,signal}()'s first argument to be a thread
pointer instead of a proc pointer and require the process pointed to
by the second argument to be locked. We now use the thread ucred reference
for the credential checks in p_can*() as a result. p_canfoo() should now
no longer need Giant.
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r-- | sys/kern/kern_proc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 8f92331..ebef4a6 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -830,7 +830,7 @@ sysctl_kern_proc(SYSCTL_HANDLER_ARGS) p = pfind((pid_t)name[0]); if (!p) return (0); - if (p_cansee(curproc, p)) { + if (p_cansee(curthread, p)) { PROC_UNLOCK(p); return (0); } @@ -861,7 +861,7 @@ sysctl_kern_proc(SYSCTL_HANDLER_ARGS) /* * Show a user only appropriate processes. */ - if (p_cansee(curproc, p)) { + if (p_cansee(curthread, p)) { PROC_UNLOCK(p); continue; } @@ -998,7 +998,7 @@ sysctl_kern_proc_args(SYSCTL_HANDLER_ARGS) if (!p) return (0); - if ((!ps_argsopen) && p_cansee(curproc, p)) { + if ((!ps_argsopen) && p_cansee(curthread, p)) { PROC_UNLOCK(p); return (0); } |