p_cansignal() returns an errno value; at some point, the check for

inter-process signalling ceased to preserve and return that value,
instead always returning EPERM.  This meant that it was possible
to "probe" the pid space for processes that were not otherwise
visible.  This change reverts that reversion.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
This commit is contained in:
Robert Watson 2002-05-14 23:07:15 +00:00
parent 5706d2e811
commit 661016419c

View File

@ -1084,9 +1084,9 @@ kill(td, uap)
/* kill single process */
if ((p = pfind(uap->pid)) == NULL) {
error = ESRCH;
} else if (p_cansignal(td->td_proc, p, uap->signum)) {
} else if ((error = p_cansignal(td->td_proc, p, uap->signum))
!= 0) {
PROC_UNLOCK(p);
error = EPERM;
} else {
if (uap->signum)
psignal(p, uap->signum);