diff options
author | rwatson <rwatson@FreeBSD.org> | 2002-03-22 14:49:12 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2002-03-22 14:49:12 +0000 |
commit | ef91e0f942ba426fa89dd0a677c6b65a416c9539 (patch) | |
tree | 688840f5aacec1a2ef0a9d6303d58a68c3f86ad3 | |
parent | d5ba9b7cc589ef2b056dfb487adcbc54a68b356d (diff) | |
download | FreeBSD-src-ef91e0f942ba426fa89dd0a677c6b65a416c9539.zip FreeBSD-src-ef91e0f942ba426fa89dd0a677c6b65a416c9539.tar.gz |
Since cred never appears to be passed into the securelevel calls as
NULL, turn warning printf's into panic's, since this call has been
restructured such that a NULL cred would result in a page fault anyway.
There appears to be one case where NULL is explicitly passed in in the
sysctl code, and this is believed to be in error, so will be modified.
Securelevels now always require a credential context so that per-jail
securelevels are properly implemented.
Obtained from: TrustedBSD Project
Sponsored by: NAI Labs
Discussed with: bde
-rw-r--r-- | sys/kern/kern_prot.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 74f25bf..562e835 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1353,7 +1353,7 @@ securelevel_gt(struct ucred *cr, int level) active_securelevel = securelevel; if (cr == NULL) - printf("securelevel_gt: cr is NULL\n"); + panic("securelevel_gt: cr is NULL\n"); if (cr->cr_prison != NULL) { mtx_lock(&cr->cr_prison->pr_mtx); active_securelevel = imax(cr->cr_prison->pr_securelevel, @@ -1370,7 +1370,7 @@ securelevel_ge(struct ucred *cr, int level) active_securelevel = securelevel; if (cr == NULL) - printf("securelevel_gt: cr is NULL\n"); + panic("securelevel_gt: cr is NULL\n"); if (cr->cr_prison != NULL) { mtx_lock(&cr->cr_prison->pr_mtx); active_securelevel = imax(cr->cr_prison->pr_securelevel, |