summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2012-01-03 18:25:15 +0100
committerEric Paris <eparis@redhat.com>2012-01-06 00:52:53 +0100
commitb7e724d303b684655e4ca3dabd5a6840ad19012d (patch)
tree5474d8d49d61ade4c5e306a0485a835587237bf4 /security
parentcapabilities: remove the task from capable LSM hook entirely (diff)
downloadlinux-b7e724d303b684655e4ca3dabd5a6840ad19012d.tar.xz
linux-b7e724d303b684655e4ca3dabd5a6840ad19012d.zip
capabilities: reverse arguments to security_capable
security_capable takes ns, cred, cap. But the LSM capable() hook takes cred, ns, cap. The capability helper functions also take cred, ns, cap. Rather than flip argument order just to flip it back, leave them alone. Heck, this should be a little faster since argument will be in the right place! Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'security')
-rw-r--r--security/security.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/security.c b/security/security.c
index 9ae68c64455e..b9e57f4fc44a 100644
--- a/security/security.c
+++ b/security/security.c
@@ -154,7 +154,7 @@ int security_capset(struct cred *new, const struct cred *old,
effective, inheritable, permitted);
}
-int security_capable(struct user_namespace *ns, const struct cred *cred,
+int security_capable(const struct cred *cred, struct user_namespace *ns,
int cap)
{
return security_ops->capable(cred, ns, cap, SECURITY_CAP_AUDIT);