summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorChris Wright <chrisw@sous-sol.org>2011-02-09 22:11:51 -0800
committerJames Morris <jmorris@namei.org>2011-02-11 17:41:58 +1100
commit6037b715d6fab139742c3df8851db4c823081561 (patch)
treeaba9e9427debd4fa5b904daefa8e71a6320f4b93 /security
parentdeabb19ba4bd8c06ae69bc262e3594b515e3a459 (diff)
downloadkernel-common-6037b715d6fab139742c3df8851db4c823081561.tar.gz
kernel-common-6037b715d6fab139742c3df8851db4c823081561.tar.bz2
kernel-common-6037b715d6fab139742c3df8851db4c823081561.zip
security: add cred argument to security_capable()
Expand security_capable() to include cred, so that it can be usable in a wider range of call sites. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r--security/security.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/security/security.c b/security/security.c
index 739e40362f44..7b7308ace8c5 100644
--- a/security/security.c
+++ b/security/security.c
@@ -154,10 +154,9 @@ int security_capset(struct cred *new, const struct cred *old,
effective, inheritable, permitted);
}
-int security_capable(int cap)
+int security_capable(const struct cred *cred, int cap)
{
- return security_ops->capable(current, current_cred(), cap,
- SECURITY_CAP_AUDIT);
+ return security_ops->capable(current, cred, cap, SECURITY_CAP_AUDIT);
}
int security_real_capable(struct task_struct *tsk, int cap)