diff options
author | Eric Paris <eparis@redhat.com> | 2012-01-03 12:25:15 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2012-01-05 18:52:53 -0500 |
commit | b7e724d303b684655e4ca3dabd5a6840ad19012d (patch) | |
tree | 5474d8d49d61ade4c5e306a0485a835587237bf4 /kernel/capability.c | |
parent | 6a9de49115d5ff9871d953af1a5c8249e1585731 (diff) | |
download | linux-stable-b7e724d303b684655e4ca3dabd5a6840ad19012d.tar.gz linux-stable-b7e724d303b684655e4ca3dabd5a6840ad19012d.tar.bz2 linux-stable-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 'kernel/capability.c')
-rw-r--r-- | kernel/capability.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/capability.c b/kernel/capability.c index 283c529f8b1c..d98392719adb 100644 --- a/kernel/capability.c +++ b/kernel/capability.c @@ -374,7 +374,7 @@ bool ns_capable(struct user_namespace *ns, int cap) BUG(); } - if (security_capable(ns, current_cred(), cap) == 0) { + if (security_capable(current_cred(), ns, cap) == 0) { current->flags |= PF_SUPERPRIV; return true; } |