]> git.neil.brown.name Git - history.git/commitdiff
LSM: Move the definition of capable() into sched.h if CONFIG_SECURITY is set to help
authorGreg Kroah-Hartman <greg@kroah.com>
Mon, 25 Nov 2002 12:09:46 +0000 (04:09 -0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Mon, 25 Nov 2002 12:09:46 +0000 (04:09 -0800)
make the #include nightmare more managable.

include/linux/sched.h
include/linux/security.h

index db1774bca8c693049ab9639d7bb8d9ce99abba3e..3cdfc8887b5c2ced49fdadfe948771b3b691a433 100644 (file)
@@ -540,8 +540,10 @@ static inline int sas_ss_flags(unsigned long sp)
 }
 
 
-#ifndef CONFIG_SECURITY
-/* capable prototype and code are in security.[hc] if CONFIG_SECURITY */
+#ifdef CONFIG_SECURITY
+/* code is in security.c */
+extern int capable(int cap);
+#else
 static inline int capable(int cap)
 {
        if (cap_raised(current->cap_effective, cap)) {
index efd997ae6b7d8aa45c22a5ba97cf7f09727fb968..a20a2b18fc3dea63b92b128fab7f0bffce8459e0 100644 (file)
@@ -1371,7 +1371,6 @@ extern int register_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_unreg_security  (const char *name, struct security_operations *ops);
-extern int capable             (int cap);
 
 
 #else /* CONFIG_SECURITY */