aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorChris Wright <chrisw@sous-sol.org>2011-02-10 01:11:51 -0500
committerJames Morris <jmorris@namei.org>2011-02-11 01:41:58 -0500
commit6037b715d6fab139742c3df8851db4c823081561 (patch)
treeaba9e9427debd4fa5b904daefa8e71a6320f4b93 /security
parentdeabb19ba4bd8c06ae69bc262e3594b515e3a459 (diff)
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,
154 effective, inheritable, permitted); 154 effective, inheritable, permitted);
155} 155}
156 156
157int security_capable(int cap) 157int security_capable(const struct cred *cred, int cap)
158{ 158{
159 return security_ops->capable(current, current_cred(), cap, 159 return security_ops->capable(current, cred, cap, SECURITY_CAP_AUDIT);
160 SECURITY_CAP_AUDIT);
161} 160}
162 161
163int security_real_capable(struct task_struct *tsk, int cap) 162int security_real_capable(struct task_struct *tsk, int cap)