From d0eac580f976bab1f322fc691863d24a003d33b8 Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Tue, 3 Jan 2012 12:25:15 -0500 Subject: [PATCH] --- yaml --- r: 285035 b: refs/heads/master c: 105ddf49cd301b7929a92f269440e8e562ef19db h: refs/heads/master i: 285033: e42a184abbfa9710bfa49dd5ad04348fb3bb0cf8 285031: 623200ece49e382ab59304215727a263345fc1b7 v: v3 --- [refs] | 2 +- trunk/kernel/capability.c | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/[refs] b/[refs] index de6baaf95947..945aacbfa29e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7b61d648499e74dbec3d4ce645675e0ae040ae78 +refs/heads/master: 105ddf49cd301b7929a92f269440e8e562ef19db diff --git a/trunk/kernel/capability.c b/trunk/kernel/capability.c index d8398e962470..5f99e5d68e1f 100644 --- a/trunk/kernel/capability.c +++ b/trunk/kernel/capability.c @@ -366,22 +366,6 @@ bool has_capability_noaudit(struct task_struct *t, int cap) return has_ns_capability_noaudit(t, &init_user_ns, cap); } -/** - * capable - Determine if the current task has a superior capability in effect - * @cap: The capability to be tested for - * - * Return true if the current task has the given superior capability currently - * available for use, false if not. - * - * This sets PF_SUPERPRIV on the task if the capability is available on the - * assumption that it's about to be used. - */ -bool capable(int cap) -{ - return ns_capable(&init_user_ns, cap); -} -EXPORT_SYMBOL(capable); - /** * ns_capable - Determine if the current task has a superior capability in effect * @ns: The usernamespace we want the capability in @@ -408,6 +392,22 @@ bool ns_capable(struct user_namespace *ns, int cap) } EXPORT_SYMBOL(ns_capable); +/** + * capable - Determine if the current task has a superior capability in effect + * @cap: The capability to be tested for + * + * Return true if the current task has the given superior capability currently + * available for use, false if not. + * + * This sets PF_SUPERPRIV on the task if the capability is available on the + * assumption that it's about to be used. + */ +bool capable(int cap) +{ + return ns_capable(&init_user_ns, cap); +} +EXPORT_SYMBOL(capable); + /** * task_ns_capable - Determine whether current task has a superior * capability targeted at a specific task's user namespace.