Merge tag 'selinux-pr-20170831' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / include / linux / lsm_hooks.h
index ce02f76a6188c5989bc76487d2e29c049ecccf03..c9258124e41757187cdb8b2f83c5901966345902 100644 (file)
  *     interpreters.  The hook can tell whether it has already been called by
  *     checking to see if @bprm->security is non-NULL.  If so, then the hook
  *     may decide either to retain the security information saved earlier or
  *     interpreters.  The hook can tell whether it has already been called by
  *     checking to see if @bprm->security is non-NULL.  If so, then the hook
  *     may decide either to retain the security information saved earlier or
- *     to replace it.
+ *     to replace it.  The hook must set @bprm->secureexec to 1 if a "secure
+ *     exec" has happened as a result of this hook call.  The flag is used to
+ *     indicate the need for a sanitized execution environment, and is also
+ *     passed in the ELF auxiliary table on the initial stack to indicate
+ *     whether libc should enable secure mode.
  *     @bprm contains the linux_binprm structure.
  *     Return 0 if the hook is successful and permission is granted.
  * @bprm_check_security:
  *     @bprm contains the linux_binprm structure.
  *     Return 0 if the hook is successful and permission is granted.
  * @bprm_check_security:
  *     linux_binprm structure.  This hook is a good place to perform state
  *     changes on the process such as clearing out non-inheritable signal
  *     state.  This is called immediately after commit_creds().
  *     linux_binprm structure.  This hook is a good place to perform state
  *     changes on the process such as clearing out non-inheritable signal
  *     state.  This is called immediately after commit_creds().
- * @bprm_secureexec:
- *     Return a boolean value (0 or 1) indicating whether a "secure exec"
- *     is required.  The flag is passed in the auxiliary table
- *     on the initial stack to the ELF interpreter to indicate whether libc
- *     should enable secure mode.
- *     @bprm contains the linux_binprm structure.
  *
  * Security hooks for filesystem operations.
  *
  *
  * Security hooks for filesystem operations.
  *
@@ -1383,7 +1381,6 @@ union security_list_options {
 
        int (*bprm_set_creds)(struct linux_binprm *bprm);
        int (*bprm_check_security)(struct linux_binprm *bprm);
 
        int (*bprm_set_creds)(struct linux_binprm *bprm);
        int (*bprm_check_security)(struct linux_binprm *bprm);
-       int (*bprm_secureexec)(struct linux_binprm *bprm);
        void (*bprm_committing_creds)(struct linux_binprm *bprm);
        void (*bprm_committed_creds)(struct linux_binprm *bprm);
 
        void (*bprm_committing_creds)(struct linux_binprm *bprm);
        void (*bprm_committed_creds)(struct linux_binprm *bprm);
 
@@ -1704,7 +1701,6 @@ struct security_hook_heads {
        struct list_head vm_enough_memory;
        struct list_head bprm_set_creds;
        struct list_head bprm_check_security;
        struct list_head vm_enough_memory;
        struct list_head bprm_set_creds;
        struct list_head bprm_check_security;
-       struct list_head bprm_secureexec;
        struct list_head bprm_committing_creds;
        struct list_head bprm_committed_creds;
        struct list_head sb_alloc_security;
        struct list_head bprm_committing_creds;
        struct list_head bprm_committed_creds;
        struct list_head sb_alloc_security;