Skip to content
Commit 993b3ab0 authored by Kees Cook's avatar Kees Cook
Browse files

apparmor: Refactor to remove bprm_secureexec hook



The AppArmor bprm_secureexec hook can be merged with the bprm_set_creds
hook since it's dealing with the same information, and all of the details
are finalized during the first call to the bprm_set_creds hook via
prepare_binprm() (subsequent calls due to binfmt_script, etc, are ignored
via bprm->called_set_creds).

Here, all the comments describe how secureexec is actually calculated
during bprm_set_creds, so this actually does it, drops the bprm flag that
was being used internally by AppArmor, and drops the bprm_secureexec hook.

Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Acked-by: default avatarJohn Johansen <john.johansen@canonical.com>
Reviewed-by: default avatarJames Morris <james.l.morris@oracle.com>
Acked-by: default avatarSerge Hallyn <serge@hallyn.com>
parent c425e189
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment