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:57 -0500 |
| commit | 105ddf49cd301b7929a92f269440e8e562ef19db (patch) | |
| tree | c292c794a322269b4963aa64ab484653cdf9c035 /kernel/capability.c | |
| parent | 7b61d648499e74dbec3d4ce645675e0ae040ae78 (diff) | |
capabilities: style only - move capable below ns_capable
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 <eparis@redhat.com>
Acked-by: Serge E. Hallyn <serge.hallyn@canonical.com>
Diffstat (limited to 'kernel/capability.c')
| -rw-r--r-- | kernel/capability.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/kernel/capability.c b/kernel/capability.c index d8398e962470..5f99e5d68e1f 100644 --- a/kernel/capability.c +++ b/kernel/capability.c | |||
| @@ -367,22 +367,6 @@ bool has_capability_noaudit(struct task_struct *t, int cap) | |||
| 367 | } | 367 | } |
| 368 | 368 | ||
| 369 | /** | 369 | /** |
| 370 | * capable - Determine if the current task has a superior capability in effect | ||
| 371 | * @cap: The capability to be tested for | ||
| 372 | * | ||
| 373 | * Return true if the current task has the given superior capability currently | ||
| 374 | * available for use, false if not. | ||
| 375 | * | ||
| 376 | * This sets PF_SUPERPRIV on the task if the capability is available on the | ||
| 377 | * assumption that it's about to be used. | ||
| 378 | */ | ||
| 379 | bool capable(int cap) | ||
| 380 | { | ||
| 381 | return ns_capable(&init_user_ns, cap); | ||
| 382 | } | ||
| 383 | EXPORT_SYMBOL(capable); | ||
| 384 | |||
| 385 | /** | ||
| 386 | * ns_capable - Determine if the current task has a superior capability in effect | 370 | * ns_capable - Determine if the current task has a superior capability in effect |
| 387 | * @ns: The usernamespace we want the capability in | 371 | * @ns: The usernamespace we want the capability in |
| 388 | * @cap: The capability to be tested for | 372 | * @cap: The capability to be tested for |
| @@ -409,6 +393,22 @@ bool ns_capable(struct user_namespace *ns, int cap) | |||
| 409 | EXPORT_SYMBOL(ns_capable); | 393 | EXPORT_SYMBOL(ns_capable); |
| 410 | 394 | ||
| 411 | /** | 395 | /** |
| 396 | * capable - Determine if the current task has a superior capability in effect | ||
| 397 | * @cap: The capability to be tested for | ||
| 398 | * | ||
| 399 | * Return true if the current task has the given superior capability currently | ||
| 400 | * available for use, false if not. | ||
| 401 | * | ||
| 402 | * This sets PF_SUPERPRIV on the task if the capability is available on the | ||
| 403 | * assumption that it's about to be used. | ||
| 404 | */ | ||
| 405 | bool capable(int cap) | ||
| 406 | { | ||
| 407 | return ns_capable(&init_user_ns, cap); | ||
| 408 | } | ||
| 409 | EXPORT_SYMBOL(capable); | ||
| 410 | |||
| 411 | /** | ||
| 412 | * task_ns_capable - Determine whether current task has a superior | 412 | * task_ns_capable - Determine whether current task has a superior |
| 413 | * capability targeted at a specific task's user namespace. | 413 | * capability targeted at a specific task's user namespace. |
| 414 | * @t: The task whose user namespace is targeted. | 414 | * @t: The task whose user namespace is targeted. |
