diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 120bd56e5d89e0021a30265c3e0c160dc13ce636..148af904c1872c2a8d78460d6182711f76fdb643 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -947,7 +947,8 @@ static int smack_bprm_set_creds(struct linux_binprm *bprm) if (rc != 0) return rc; - } else if (bprm->unsafe) + } + if (bprm->unsafe & ~LSM_UNSAFE_PTRACE) return -EPERM; bsp->smk_task = isp->smk_task;