aboutsummaryrefslogtreecommitdiff
path: root/lib/portability.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-01-16 13:36:53 -0600
committerElliott Hughes <enh@google.com>2015-01-16 13:36:53 -0600
commit7e2af1c7489cbf974a57d482bb9d23c884d2aa49 (patch)
treed358db3adabf66240ed384d49b2834d3d33b7d9a /lib/portability.h
parent376a2579ec2d0a9bb64d30668b7e32ab220aa023 (diff)
downloadtoybox-7e2af1c7489cbf974a57d482bb9d23c884d2aa49.tar.gz
This patch adds a TOYBOX_SELINUX configuration option to control both
the SELinux commands (such as chcon) and the SELinux-specific options to regular commands (such as ls -Z). This lets us #include <selinux/selinux.h> in portability.h. I've also fixed chcon to insist on being given the a context argument. This patch also adds -Z to id and fixes id's regular output (-G should be separated by spaces, non-G output should be separated by commas, and you don't want a double comma where the egid is omitted from the list of groups).
Diffstat (limited to 'lib/portability.h')
-rw-r--r--lib/portability.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/portability.h b/lib/portability.h
index 8bbbdb25..67ac5b58 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -236,3 +236,7 @@ pid_t xfork(void);
//#define strncpy(...) @@strncpyisbadmmkay@@
//#define strncat(...) @@strcatisbadmmkay@@
+
+#if CFG_TOYBOX_SELINUX
+#include <selinux/selinux.h>
+#endif