Skip to content

Commit

Permalink
capabilities: style only - move capable below ns_capable
Browse files Browse the repository at this point in the history
Although the current code is fine for consistency this moves the capable
code below the function it calls in the c file.  It doesn't actually change
code.

Signed-off-by: Eric Paris <[email protected]>
Acked-by: Serge E. Hallyn <[email protected]>
  • Loading branch information
eparis committed Jan 5, 2012
1 parent 7b61d64 commit 105ddf4
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions kernel/capability.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit 105ddf4

Please sign in to comment.