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>
Tento commit je obsažen v:
Eric Paris
2012-01-03 12:25:15 -05:00
rodič 6a9de49115
revize b7e724d303
4 změnil soubory, kde provedl 6 přidání a 6 odebrání

Zobrazit soubor

@@ -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;
}