Commit ae7b2bb7 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

LSM: Move the definition of capable() into sched.h if CONFIG_SECURITY is set to help

make the #include nightmare more managable.
parent 3b7ce416
...@@ -540,8 +540,10 @@ static inline int sas_ss_flags(unsigned long sp) ...@@ -540,8 +540,10 @@ static inline int sas_ss_flags(unsigned long sp)
} }
#ifndef CONFIG_SECURITY #ifdef CONFIG_SECURITY
/* capable prototype and code are in security.[hc] if CONFIG_SECURITY */ /* code is in security.c */
extern int capable(int cap);
#else
static inline int capable(int cap) static inline int capable(int cap)
{ {
if (cap_raised(current->cap_effective, cap)) { if (cap_raised(current->cap_effective, cap)) {
......
...@@ -1371,7 +1371,6 @@ extern int register_security (struct security_operations *ops); ...@@ -1371,7 +1371,6 @@ extern int register_security (struct security_operations *ops);
extern int unregister_security (struct security_operations *ops); extern int unregister_security (struct security_operations *ops);
extern int mod_reg_security (const char *name, struct security_operations *ops); extern int mod_reg_security (const char *name, struct security_operations *ops);
extern int mod_unreg_security (const char *name, struct security_operations *ops); extern int mod_unreg_security (const char *name, struct security_operations *ops);
extern int capable (int cap);
#else /* CONFIG_SECURITY */ #else /* CONFIG_SECURITY */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment