o Correct authorization check in CANSIGIO(), which suffered from incorrect

transcription during the (pcred,ucred) merge; this was not used for
  the kill() system call, so does not affect direct explicit process
  signalling.

Pointed out by:	fenner
This commit is contained in:
Robert Watson 2001-09-15 22:34:46 +00:00
parent 460aaf4bd3
commit 9844fbc3b5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=83525

View file

@ -99,13 +99,14 @@ SYSCTL_INT(_kern, KERN_LOGSIGEXIT, logsigexit, CTLFLAG_RW,
/*
* Policy -- Can ucred cr1 send SIGIO to process cr2?
* XXX: should use suser(), p_cansignal().
*/
#define CANSIGIO(cr1, cr2) \
((cr1)->cr_uid == 0 || \
(cr2)->cr_ruid == (cr2)->cr_ruid || \
(cr2)->cr_uid == (cr2)->cr_ruid || \
(cr2)->cr_ruid == (cr2)->cr_uid || \
(cr2)->cr_uid == (cr2)->cr_uid)
(cr1)->cr_ruid == (cr2)->cr_ruid || \
(cr1)->cr_uid == (cr2)->cr_ruid || \
(cr1)->cr_ruid == (cr2)->cr_uid || \
(cr1)->cr_uid == (cr2)->cr_uid)
int sugid_coredump;
SYSCTL_INT(_kern, OID_AUTO, sugid_coredump, CTLFLAG_RW,