mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 07:01:23 +00:00
[PATCH] refactor capable() to one implementation, add __capable() helper
Move capable() to kernel/capability.c and eliminate duplicate implementations. Add __capable() function which can be used to check for capabiilty of any process. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
77d47582c2
commit
12b5989be1
5 changed files with 34 additions and 42 deletions
|
@ -357,7 +357,8 @@ static inline kernel_cap_t cap_invert(kernel_cap_t c)
|
|||
|
||||
#define cap_is_fs_cap(c) (CAP_TO_MASK(c) & CAP_FS_MASK)
|
||||
|
||||
extern int capable(int cap);
|
||||
int capable(int cap);
|
||||
int __capable(struct task_struct *t, int cap);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue