mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
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:
parent
5706d2e811
commit
661016419c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96620
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user