summaryrefslogtreecommitdiffstats
path: root/sys/security/mac/mac_framework.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/security/mac/mac_framework.c')
-rw-r--r--sys/security/mac/mac_framework.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c
index 64b6f09..e1f2531 100644
--- a/sys/security/mac/mac_framework.c
+++ b/sys/security/mac/mac_framework.c
@@ -1257,6 +1257,9 @@ mac_execve_transition(struct ucred *old, struct ucred *new, struct vnode *vp)
ASSERT_VOP_LOCKED(vp, "mac_execve_transition");
+ if (!mac_enforce_process && !mac_enforce_fs)
+ return;
+
MAC_PERFORM(execve_transition, old, new, vp, &vp->v_label);
}
@@ -1265,6 +1268,11 @@ mac_execve_will_transition(struct ucred *old, struct vnode *vp)
{
int result;
+ ASSERT_VOP_LOCKED(vp, "mac_execve_will_transition");
+
+ if (!mac_enforce_process && !mac_enforce_fs)
+ return (0);
+
result = 0;
MAC_BOOLEAN(execve_will_transition, ||, old, vp, &vp->v_label);
OpenPOWER on IntegriCloud