diff options
author | Elliott Hughes <enh@google.com> | 2015-01-16 13:36:53 -0600 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-01-16 13:36:53 -0600 |
commit | 7e2af1c7489cbf974a57d482bb9d23c884d2aa49 (patch) | |
tree | d358db3adabf66240ed384d49b2834d3d33b7d9a /toys/pending | |
parent | 376a2579ec2d0a9bb64d30668b7e32ab220aa023 (diff) | |
download | toybox-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 'toys/pending')
-rw-r--r-- | toys/pending/chcon.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/toys/pending/chcon.c b/toys/pending/chcon.c index 41259de6..0ef4e1e5 100644 --- a/toys/pending/chcon.c +++ b/toys/pending/chcon.c @@ -2,11 +2,12 @@ * * Copyright 2014 The Android Open Source Project -USE_CHCON(NEWTOY(chcon, "hRv", TOYFLAG_USR|TOYFLAG_BIN)) +USE_CHCON(NEWTOY(chcon, "<1hRv", TOYFLAG_USR|TOYFLAG_BIN)) config CHCON bool "chcon" - default n + depends on TOYBOX_SELINUX + default y help usage: chcon [-hRv] CONTEXT FILE... @@ -19,7 +20,6 @@ config CHCON #define FOR_chcon #include "toys.h" -#include <selinux/selinux.h> GLOBALS( char *context; |