aboutsummaryrefslogtreecommitdiffstats
path: root/security/smack
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-07-18 18:25:33 -0400
committerKees Cook <keescook@chromium.org>2017-08-01 15:03:12 -0400
commit35b372b76f7153142cd4838ef1e1e094d115f46f (patch)
tree2a80260f236415854032fbedeb1b35074984231d /security/smack
parenta70423dfbc58402cc2573f95b7e842024aff7162 (diff)
smack: Remove redundant pdeath_signal clearing
This removes the redundant pdeath_signal clearing in Smack: the check in smack_bprm_committing_creds() matches the check in smack_bprm_set_creds() (which used to be in the now-removed smack_bprm_securexec() hook) and since secureexec is now being checked for clearing pdeath_signal, this is redundant to the common exec code. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Serge Hallyn <serge@hallyn.com> Reviewed-by: James Morris <james.l.morris@oracle.com> Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'security/smack')
-rw-r--r--security/smack/smack_lsm.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 791d028207b9..319add31b4a4 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -957,20 +957,6 @@ static int smack_bprm_set_creds(struct linux_binprm *bprm)
957 return 0; 957 return 0;
958} 958}
959 959
960/**
961 * smack_bprm_committing_creds - Prepare to install the new credentials
962 * from bprm.
963 *
964 * @bprm: binprm for exec
965 */
966static void smack_bprm_committing_creds(struct linux_binprm *bprm)
967{
968 struct task_smack *bsp = bprm->cred->security;
969
970 if (bsp->smk_task != bsp->smk_forked)
971 current->pdeath_signal = 0;
972}
973
974/* 960/*
975 * Inode hooks 961 * Inode hooks
976 */ 962 */
@@ -4633,7 +4619,6 @@ static struct security_hook_list smack_hooks[] __lsm_ro_after_init = {
4633 LSM_HOOK_INIT(sb_parse_opts_str, smack_parse_opts_str), 4619 LSM_HOOK_INIT(sb_parse_opts_str, smack_parse_opts_str),
4634 4620
4635 LSM_HOOK_INIT(bprm_set_creds, smack_bprm_set_creds), 4621 LSM_HOOK_INIT(bprm_set_creds, smack_bprm_set_creds),
4636 LSM_HOOK_INIT(bprm_committing_creds, smack_bprm_committing_creds),
4637 4622
4638 LSM_HOOK_INIT(inode_alloc_security, smack_inode_alloc_security), 4623 LSM_HOOK_INIT(inode_alloc_security, smack_inode_alloc_security),
4639 LSM_HOOK_INIT(inode_free_security, smack_inode_free_security), 4624 LSM_HOOK_INIT(inode_free_security, smack_inode_free_security),