Put SELINUX in a a menu, and add config option for SMACK.
authorRob Landley <rob@landley.net>
Thu, 16 Apr 2015 01:53:00 +0000 (20:53 -0500)
committerRob Landley <rob@landley.net>
Thu, 16 Apr 2015 01:53:00 +0000 (20:53 -0500)
Config.in
lib/portability.h

index 0d7cb0e..9d3a73b 100644 (file)
--- a/Config.in
+++ b/Config.in
@@ -35,12 +35,32 @@ config TOYBOX_SUID
 
          chown root:root toybox; chmod +s toybox
 
+choice
+       prompt "Security Blanket"
+       default TOYBOX_LSM_NONE
+       help
+         Select a Linux Security Module to complicate your system
+         until you can't find holes in it.
+
+config TOYBOX_LSM_NONE
+       bool "None"
+       help
+          Don't try to achieve "watertight" by plugging the holes in a
+          collander, instead use conventional unix security (and possibly
+          Linux Containers) for a simple straightforward system.
+         
 config TOYBOX_SELINUX
- bool "SELinux support"
- default n
- help
-  Include SELinux options in commands such as ls, and add
-  SELinux-specific commands such as chcon to the Android menu.
+       bool "SELinux support"
+       help
+         Include SELinux options in commands such as ls, and add
+         SELinux-specific commands such as chcon to the Android menu.
+
+config TOYBOX_SMACK
+       bool "SMACK support"
+       help
+         Include SMACK options in commands like ls for systems like Tizen.
+
+endchoice
 
 config TOYBOX_FLOAT
        bool "Floating point support"
index a10213e..f23d4f6 100644 (file)
@@ -246,3 +246,7 @@ pid_t xfork(void);
 #define is_selinux_enabled() 0
 int getcon(void* con);
 #endif
+
+#if CFG_TOYBOX_SMACK
+#include <sys/smack.h>
+#endif