diff options
| author | Chris Metcalf <cmetcalf@tilera.com> | 2011-05-26 11:52:04 -0400 |
|---|---|---|
| committer | Chris Metcalf <cmetcalf@tilera.com> | 2011-05-26 11:52:04 -0400 |
| commit | 7a0287df3e83a0012dfc496d4a8af9c1c5b126ef (patch) | |
| tree | 27cc2f768de7e9014ffa899117bf219d0f20fb5e /kernel/capability.c | |
| parent | 6738d3210aabe3016a1b03cd98a7fc479c229197 (diff) | |
| parent | 61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf (diff) | |
Merge tag 'v2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'kernel/capability.c')
| -rw-r--r-- | kernel/capability.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/capability.c b/kernel/capability.c index bf0c734d0c12..32a80e08ff4b 100644 --- a/kernel/capability.c +++ b/kernel/capability.c | |||
| @@ -399,3 +399,15 @@ bool task_ns_capable(struct task_struct *t, int cap) | |||
| 399 | return ns_capable(task_cred_xxx(t, user)->user_ns, cap); | 399 | return ns_capable(task_cred_xxx(t, user)->user_ns, cap); |
| 400 | } | 400 | } |
| 401 | EXPORT_SYMBOL(task_ns_capable); | 401 | EXPORT_SYMBOL(task_ns_capable); |
| 402 | |||
| 403 | /** | ||
| 404 | * nsown_capable - Check superior capability to one's own user_ns | ||
| 405 | * @cap: The capability in question | ||
| 406 | * | ||
| 407 | * Return true if the current task has the given superior capability | ||
| 408 | * targeted at its own user namespace. | ||
| 409 | */ | ||
| 410 | bool nsown_capable(int cap) | ||
| 411 | { | ||
| 412 | return ns_capable(current_user_ns(), cap); | ||
| 413 | } | ||
