diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-10-15 13:46:29 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-10-15 13:46:29 +0200 |
| commit | b2aaf8f74cdc84a9182f6cabf198b7763bcb9d40 (patch) | |
| tree | 53ccb1c2c14751fe69cf93102e76e97021f6df07 /include/linux/capability.h | |
| parent | 4f962d4d65923d7b722192e729840cfb79af0a5a (diff) | |
| parent | 278429cff8809958d25415ba0ed32b59866ab1a8 (diff) | |
| download | lwn-b2aaf8f74cdc84a9182f6cabf198b7763bcb9d40.tar.gz lwn-b2aaf8f74cdc84a9182f6cabf198b7763bcb9d40.zip | |
Merge branch 'linus' into stackprotector
Conflicts:
arch/x86/kernel/Makefile
include/asm-x86/pda.h
Diffstat (limited to 'include/linux/capability.h')
| -rw-r--r-- | include/linux/capability.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/linux/capability.h b/include/linux/capability.h index fa830f8de032..9d1fe30b6f6c 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h @@ -501,8 +501,21 @@ extern const kernel_cap_t __cap_empty_set; extern const kernel_cap_t __cap_full_set; extern const kernel_cap_t __cap_init_eff_set; -int capable(int cap); -int __capable(struct task_struct *t, int cap); +kernel_cap_t cap_set_effective(const kernel_cap_t pE_new); + +/** + * 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__ */ |
