]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - security/smack/smack_access.c
Merge branch 'topic/next' into for-next
[karo-tx-linux.git] / security / smack / smack_access.c
index 9f3705e927128b74c299e24afb4146b51881f6bf..db14689a21e02ad60bc8cd1ab5e5dc97f8419188 100644 (file)
@@ -220,14 +220,9 @@ int smk_curacc(char *obj_label, u32 mode, struct smk_audit_info *a)
        }
 
        /*
-        * Return if a specific label has been designated as the
-        * only one that gets privilege and current does not
-        * have that label.
+        * Allow for priviliged to override policy.
         */
-       if (smack_onlycap != NULL && smack_onlycap != sp)
-               goto out_audit;
-
-       if (capable(CAP_MAC_OVERRIDE))
+       if (rc != 0 && smack_privileged(CAP_MAC_OVERRIDE))
                rc = 0;
 
 out_audit: