diff options
Diffstat (limited to 'include/linux/capability.h')
-rw-r--r-- | include/linux/capability.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/linux/capability.h b/include/linux/capability.h index 02673846d205..9d1fe30b6f6c 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -503,8 +503,19 @@ extern const kernel_cap_t __cap_init_eff_set; | |||
503 | 503 | ||
504 | kernel_cap_t cap_set_effective(const kernel_cap_t pE_new); | 504 | kernel_cap_t cap_set_effective(const kernel_cap_t pE_new); |
505 | 505 | ||
506 | int capable(int cap); | 506 | /** |
507 | int __capable(struct task_struct *t, int cap); | 507 | * has_capability - Determine if a task has a superior capability available |
508 | * @t: The task in question | ||
509 | * @cap: The capability to be tested for | ||
510 | * | ||
511 | * Return true if the specified task has the given superior capability | ||
512 | * currently in effect, false if not. | ||
513 | * | ||
514 | * Note that this does not set PF_SUPERPRIV on the task. | ||
515 | */ | ||
516 | #define has_capability(t, cap) (security_capable((t), (cap)) == 0) | ||
517 | |||
518 | extern int capable(int cap); | ||
508 | 519 | ||
509 | #endif /* __KERNEL__ */ | 520 | #endif /* __KERNEL__ */ |
510 | 521 | ||