From 7e2af1c7489cbf974a57d482bb9d23c884d2aa49 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 16 Jan 2015 13:36:53 -0600 Subject: 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 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). --- toys/pending/chcon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'toys/pending') 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 GLOBALS( char *context; -- cgit v1.2.3