These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / security / apparmor / domain.c
index d97cba3..dc0027b 100644 (file)
@@ -347,9 +347,7 @@ int apparmor_bprm_set_creds(struct linux_binprm *bprm)
                file_inode(bprm->file)->i_mode
        };
        const char *name = NULL, *target = NULL, *info = NULL;
-       int error = cap_bprm_set_creds(bprm);
-       if (error)
-               return error;
+       int error = 0;
 
        if (bprm->cred_prepared)
                return 0;
@@ -531,15 +529,13 @@ cleanup:
  */
 int apparmor_bprm_secureexec(struct linux_binprm *bprm)
 {
-       int ret = cap_bprm_secureexec(bprm);
-
        /* the decision to use secure exec is computed in set_creds
         * and stored in bprm->unsafe.
         */
-       if (!ret && (bprm->unsafe & AA_SECURE_X_NEEDED))
-               ret = 1;
+       if (bprm->unsafe & AA_SECURE_X_NEEDED)
+               return 1;
 
-       return ret;
+       return 0;
 }
 
 /**