Kconfig patch

Jens Kasten <[email protected]> Fri, 21 Jun 2013 18:46:49 +0200
Newsgroups gmane.linux.rsbac
Message-ID <[email protected]>
Hi list,
here is a small patch which make the module depends on RSBAC_AUTH if 
they want protect the AUTH module.
Grüße
Jens

_______________________________________________
rsbac mailing list
[email protected]
http://www.rsbac.org/mailman/listinfo/rsbac
rsbac_kconfig_diff.patch (text/x-diff, 6.2 KB)
diff --git a/rsbac/Kconfig b/rsbac/Kconfig
index 9f1222c..47d3b31 100644
--- a/rsbac/Kconfig
+++ b/rsbac/Kconfig
@@ -743,8 +743,7 @@ config RSBAC_AUTH_LEARN
 config RSBAC_AUTH_LEARN_TA
 	int 'Learning mode transaction number'
 	default 0
-	depends on RSBAC_AUTH_LEARN
-	depends on RSBAC_LIST_TRANS
+	depends on RSBAC_AUTH_LEARN && RSBAC_LIST_TRANS
 	---help---
 	  Put learned items into transaction with this number. The
 	  transaction is created, if it does not exist. The default
@@ -782,6 +781,7 @@ menuconfig RSBAC_RC
 if RSBAC_RC
 config RSBAC_RC_AUTH_PROT
 	bool 'RC protection for AUTH module'
+    depends on RSBAC_AUTH
 	default y
 	---help---
 	  This option makes RC care for AUTH module settings, e.g. attributes
@@ -875,8 +875,7 @@ config RSBAC_RC_LEARN
 config RSBAC_RC_LEARN_TA
 	int 'Learning mode transaction number'
 	default 0
-	depends on RSBAC_RC_LEARN
-	depends on RSBAC_LIST_TRANS
+	depends on RSBAC_RC_LEARN && RSBAC_LIST_TRANS
 	---help---
 	  Put learned items into transaction with this number. The
 	  transaction is created, if it does not exist. The default
@@ -949,6 +948,7 @@ config RSBAC_ACL_SUPER_FILTER
 
 config RSBAC_ACL_AUTH_PROT
 	bool 'ACL protection for AUTH module'
+    depends on RSBAC_AUTH
 	default y
 	---help---
 	  This option makes ACL care for AUTH module settings, e.g. attributes
@@ -996,8 +996,7 @@ config RSBAC_ACL_LEARN
 config RSBAC_ACL_LEARN_TA
 	int 'Learning mode transaction number'
 	default 0
-	depends on RSBAC_ACL_LEARN
-	depends on RSBAC_LIST_TRANS
+	depends on RSBAC_ACL_LEARN && RSBAC_LIST_TRANS
 	---help---
 	  Put learned items into transaction with this number. The
 	  transaction is created, if it does not exist. The default
@@ -1096,6 +1095,7 @@ config RSBAC_MAC_SMART_INHERIT
 	  denying explicit labeling of new objects. Use with care.
 
 config RSBAC_MAC_AUTH_PROT
+    depends on RSBAC_AUTH
 	bool 'MAC protection for AUTH module'
 	---help---
 	  This option makes MAC care for AUTH module settings, e.g. attributes
@@ -1359,6 +1359,7 @@ config RSBAC_CAP_PROC_HIDE
 	  own process properties.
 
 config RSBAC_CAP_AUTH_PROT
+    depends on RSBAC_AUTH
 	bool 'CAP protection for AUTH module'
 	---help---
 	  This option makes CAP care for AUTH module settings, e.g. attributes
@@ -1411,8 +1412,7 @@ config RSBAC_CAP_LEARN
 config RSBAC_CAP_LEARN_TA
 	int 'Learning mode transaction number'
 	default 0
-	depends on RSBAC_CAP_LEARN
-	depends on RSBAC_LIST_TRANS
+	depends on RSBAC_CAP_LEARN && RSBAC_LIST_TRANS
 	---help---
 	  Put learned items into transaction with this number. The
 	  transaction is created, if it does not exist. The default
@@ -1562,6 +1562,7 @@ menuconfig RSBAC_FF
 
 if RSBAC_FF
 config RSBAC_FF_AUTH_PROT
+    depends on RSBAC_AUTH
 	bool 'FF protection for AUTH module'
 	---help---
 	  This option makes FF care for AUTH module settings, e.g. attributes
@@ -1604,6 +1605,7 @@ menuconfig RSBAC_PM
 
 if RSBAC_PM
 config RSBAC_PM_AUTH_PROT
+    depends on RSBAC_AUTH
 	bool 'PM protection for AUTH module'
 	---help---
 	  This option makes PM care for AUTH module settings, e.g. attributes
@@ -1735,85 +1737,73 @@ config RSBAC_SWITCH_BOOT_OFF
 config RSBAC_SWITCH_REG
 	default y
 	bool 'Switch REG modules'
-	depends on RSBAC_SWITCH
-	depends on RSBAC_REG
+	depends on RSBAC_SWITCH && RSBAC_REG
 	---help---
 	  Select to switch REG modules on and off at runtime.
 
 config RSBAC_SWITCH_AUTH
 	bool 'Switch AUTH policy'
-	depends on RSBAC_SWITCH
-	depends on RSBAC_AUTH
+	depends on RSBAC_SWITCH && RSBAC_AUTH
 	---help---
 	  Select to switch AUTH module on and off at runtime.
 
 config RSBAC_SWITCH_RC
 	bool 'Switch RC policy'
-	depends on RSBAC_SWITCH
-	depends on RSBAC_RC
+	depends on RSBAC_SWITCH && RSBAC_RC
 	---help---
 	  Select to switch RC module on and off at runtime.
 
 config RSBAC_SWITCH_ACL
 	bool 'Switch ACL policy'
-	depends on RSBAC_SWITCH
-	depends on RSBAC_ACL
+	depends on RSBAC_SWITCH && RSBAC_ACL
 	---help---
 	  Select to switch ACL module on and off at runtime.
 
 config RSBAC_SWITCH_MAC
 	bool 'Switch MAC policy'
-	depends on RSBAC_SWITCH
-	depends on RSBAC_MAC
+	depends on RSBAC_SWITCH && RSBAC_MAC
 	---help---
 	  Select to switch MAC module on and off at runtime.
 
 config RSBAC_SWITCH_PAX
 	bool 'Switch PAX policy'
-	depends on RSBAC_SWITCH
-	depends on RSBAC_PAX
+	depends on RSBAC_SWITCH && RSBAC_PAX
 	---help---
 	  Select to switch PAX module on and off at runtime.
 
 config RSBAC_SWITCH_DAZ
 	bool 'Switch DAZ policy'
-	depends on RSBAC_SWITCH
-	depends on RSBAC_DAZ
+	depends on RSBAC_SWITCH && RSBAC_DAZ
 	---help---
 	  Select to switch DAZ module on and off at runtime.
 
 config RSBAC_SWITCH_CAP
 	bool 'Switch CAP policy'
-	depends on RSBAC_SWITCH
-	depends on RSBAC_CAP
+	depends on RSBAC_SWITCH && RSBAC_CAP
 	---help---
 	  Select to switch CAP module on and off at runtime.
 
 config RSBAC_SWITCH_JAIL
 	bool 'Switch JAIL policy'
-	depends on RSBAC_SWITCH
-	depends on RSBAC_JAIL
+	depends on RSBAC_SWITCH && RSBAC_JAIL
 	---help---
 	  Select to switch JAIL module on and off at runtime.
 
 config RSBAC_SWITCH_RES
 	bool 'Switch RES policy'
-	depends on RSBAC_SWITCH
-	depends on RSBAC_RES
+	depends on RSBAC_SWITCH && RSBAC_RES
 	---help---
 	  Select to switch RES module on and off at runtime.
 
 config RSBAC_SWITCH_FF
 	bool 'Switch FF policy'
-	depends on RSBAC_SWITCH
-	depends on RSBAC_FF
+	depends on RSBAC_SWITCH && RSBAC_FF
 	---help---
 	  Select to switch FF module on and off at runtime.
 
 config RSBAC_SWITCH_PM
-	bool 'Switch PM policy'
-	depends on RSBAC_SWITCH
-	depends on RSBAC_PM
+	bool 'Switch PM policy' 
+	depends on RSBAC_SWITCH && RSBAC_PM
 	---help---
 	  Select to switch PM module on and off at runtime.
 endmenu
@@ -2134,6 +2124,7 @@ menu 'Other RSBAC options'
 
 config RSBAC_SECDEL
 	bool 'Support secure_delete'
+    depends on EXT2_FS || EXT3_FS || EXT4_FS || MSDOS_FS || VFAT_FS
 	---help---
 	  This option enables secure deletion and truncation of all files.
 	  The decision whether to overwrite is dispatched to all modules,
@@ -2232,7 +2223,7 @@ config RSBAC_FREEZE
 
 config RSBAC_FREEZE_UM
 	bool 'Also freeze User Management'
-	        depends on RSBAC_FREEZE && RSBAC_UM
+	depends on RSBAC_FREEZE && RSBAC_UM
 	---help---
 	  If enabled, the RSBAC User Management gets frozen, too.