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>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user