ChangeSet 1.842.44.3, 2002/11/25 20:09:46-08:00, greg@kroah.com

LSM: Move the definition of capable() into sched.h if CONFIG_SECURITY is set to help
make the #include nightmare more managable.


diff -Nru a/include/linux/sched.h b/include/linux/sched.h
--- a/include/linux/sched.h	Tue Nov 26 14:02:15 2002
+++ b/include/linux/sched.h	Tue Nov 26 14:02:15 2002
@@ -540,8 +540,10 @@
 }
 
 
-#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)) {
diff -Nru a/include/linux/security.h b/include/linux/security.h
--- a/include/linux/security.h	Tue Nov 26 14:02:15 2002
+++ b/include/linux/security.h	Tue Nov 26 14:02:15 2002
@@ -1371,7 +1371,6 @@
 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 */
