summaryrefslogtreecommitdiff
path: root/kernel/capability.c
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2012-01-03 17:25:15 (GMT)
committerEric Paris <eparis@redhat.com>2012-01-05 23:52:58 (GMT)
commitd2a7009f0bb03fa22ad08dd25472efa0568126b9 (patch)
treea24f4739d1063b96789770fbc463069d96bde2f8 /kernel/capability.c
parent105ddf49cd301b7929a92f269440e8e562ef19db (diff)
downloadlinux-3.10-d2a7009f0bb03fa22ad08dd25472efa0568126b9.zip
linux-3.10-d2a7009f0bb03fa22ad08dd25472efa0568126b9.tar.gz
linux-3.10-d2a7009f0bb03fa22ad08dd25472efa0568126b9.tar.bz2
capabitlies: ns_capable can use the cap helpers rather than lsm call
Just to reduce the number of places to change if we every change the LSM hook, use the capability helpers internally when possible. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Serge E. Hallyn <serge.hallyn@canonical.com>
Diffstat (limited to 'kernel/capability.c')
-rw-r--r--kernel/capability.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/capability.c b/kernel/capability.c
index 5f99e5d..4762644 100644
--- a/kernel/capability.c
+++ b/kernel/capability.c
@@ -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;
}