diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-08-26 10:25:59 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-08-26 10:25:59 +0200 |
| commit | 3cf430b0636045dc524759a0852293ba037732a7 (patch) | |
| tree | 2c4e03f9028dc23ab4e6ca5a3a5a263af397984f /include/linux/capability.h | |
| parent | 93dcf55f828b035fc93fc19eb03c1390e1e6d570 (diff) | |
| parent | 83097aca8567a0bd593534853b71fe0fa9a75d69 (diff) | |
Merge branch 'linus' into sched/devel
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; kernel_cap_t cap_set_effective(const kernel_cap_t pE_new); -int capable(int cap); -int __capable(struct task_struct *t, int cap); +/** + * has_capability - Determine if a task has a superior capability available + * @t: The task in question + * @cap: The capability to be tested for + * + * Return true if the specified task has the given superior capability + * currently in effect, false if not. + * + * Note that this does not set PF_SUPERPRIV on the task. + */ +#define has_capability(t, cap) (security_capable((t), (cap)) == 0) + +extern int capable(int cap); #endif /* __KERNEL__ */ |
