diff options
author | rwatson <rwatson@FreeBSD.org> | 2001-09-15 22:34:46 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2001-09-15 22:34:46 +0000 |
commit | 448e9232ac683c67582e1993af8d6508b1795fa8 (patch) | |
tree | 1feec8e3efd7ef8f10b2e1a9c1b0f33b03f12d12 /sys/kern/kern_sig.c | |
parent | f4750b106623b4d923dbc0de54a00642b3aad6bc (diff) | |
download | FreeBSD-src-448e9232ac683c67582e1993af8d6508b1795fa8.zip FreeBSD-src-448e9232ac683c67582e1993af8d6508b1795fa8.tar.gz |
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
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r-- | sys/kern/kern_sig.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 233bdbe..cd5c5ea 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -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, |