summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_prot.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r--sys/kern/kern_prot.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 57216db..38b9042 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -1275,10 +1275,9 @@ securelevel_gt(struct ucred *cr, int level)
active_securelevel = securelevel;
KASSERT(cr != NULL, ("securelevel_gt: null cr"));
- if (cr->cr_prison != NULL) {
+ if (cr->cr_prison != NULL)
active_securelevel = imax(cr->cr_prison->pr_securelevel,
active_securelevel);
- }
return (active_securelevel > level ? EPERM : 0);
}
@@ -1289,10 +1288,9 @@ securelevel_ge(struct ucred *cr, int level)
active_securelevel = securelevel;
KASSERT(cr != NULL, ("securelevel_ge: null cr"));
- if (cr->cr_prison != NULL) {
+ if (cr->cr_prison != NULL)
active_securelevel = imax(cr->cr_prison->pr_securelevel,
active_securelevel);
- }
return (active_securelevel >= level ? EPERM : 0);
}
OpenPOWER on IntegriCloud