diff options
author | Chris Wright <chrisw@sous-sol.org> | 2011-02-10 07:11:51 +0100 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2011-02-11 07:41:58 +0100 |
commit | 6037b715d6fab139742c3df8851db4c823081561 (patch) | |
tree | aba9e9427debd4fa5b904daefa8e71a6320f4b93 /security | |
parent | Merge branch 'for-james' of git://tpmdd.git.sourceforge.net/gitroot/tpmdd/tpm... (diff) | |
download | linux-6037b715d6fab139742c3df8851db4c823081561.tar.xz linux-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.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, 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) |