diff options
author | John Baldwin <jhb@FreeBSD.org> | 2002-05-19 00:14:50 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2002-05-19 00:14:50 +0000 |
commit | f44d9e24fbb396076ebabf326c6f80e166d3d4a5 (patch) | |
tree | 0642e3c6447c397fe8442630e46788930550bb42 /sys/kern/kern_sig.c | |
parent | 2bab796d96af8c985c3258e20e5459a7a64d9c6d (diff) | |
download | src-f44d9e24fbb396076ebabf326c6f80e166d3d4a5.tar.gz src-f44d9e24fbb396076ebabf326c6f80e166d3d4a5.zip |
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.
Notes
Notes:
svn path=/head/; revision=96886
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r-- | sys/kern/kern_sig.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 3b013666c3fa..2a57c91ba350 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1012,7 +1012,7 @@ killpg1(td, sig, pgid, all) PROC_UNLOCK(p); continue; } - if (p_cansignal(td->td_proc, p, sig) == 0) { + if (p_cansignal(td, p, sig) == 0) { nfound++; if (sig) psignal(p, sig); @@ -1046,7 +1046,7 @@ killpg1(td, sig, pgid, all) PROC_UNLOCK(p); continue; } - if (p_cansignal(td->td_proc, p, sig) == 0) { + if (p_cansignal(td, p, sig) == 0) { nfound++; if (sig) psignal(p, sig); @@ -1084,8 +1084,7 @@ kill(td, uap) /* kill single process */ if ((p = pfind(uap->pid)) == NULL) { error = ESRCH; - } else if ((error = p_cansignal(td->td_proc, p, uap->signum)) - != 0) { + } else if ((error = p_cansignal(td, p, uap->signum)) != 0) { PROC_UNLOCK(p); } else { if (uap->signum) |