]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - kernel/capability.c
capabitlies: ns_capable can use the cap helpers rather than lsm call
[karo-tx-linux.git] / kernel / capability.c
index 5f99e5d68e1f97b680d6e370be49c89190eaad93..47626446c39affe8247c38787bf83f5c40a0a643 100644 (file)
@@ -384,7 +384,7 @@ bool ns_capable(struct user_namespace *ns, int cap)
                BUG();
        }
 
-       if (security_capable(current_cred(), ns, cap) == 0) {
+       if (has_ns_capability(current, ns, cap)) {
                current->flags |= PF_SUPERPRIV;
                return true;
        }