diff options
author | Chris Wright <chrisw@sous-sol.org> | 2011-02-10 01:11:51 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2011-02-11 01:41:58 -0500 |
commit | 6037b715d6fab139742c3df8851db4c823081561 (patch) | |
tree | aba9e9427debd4fa5b904daefa8e71a6320f4b93 /security | |
parent | deabb19ba4bd8c06ae69bc262e3594b515e3a459 (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.c | 5 |
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 | ||
157 | int security_capable(int cap) | 157 | int 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 | ||
163 | int security_real_capable(struct task_struct *tsk, int cap) | 162 | int security_real_capable(struct task_struct *tsk, int cap) |