aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/runcon.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-03-23 13:45:47 -0500
committerRob Landley <rob@landley.net>2015-03-23 13:45:47 -0500
commit47dd32825ea32796f3094f45f4e4b0e7e1657520 (patch)
tree4e82d46ff6a9198a3025c53a3b91c74a0b044c26 /toys/pending/runcon.c
parent9a4128f32978c71dd417d9ce5fa4677f00dd4683 (diff)
downloadtoybox-47dd32825ea32796f3094f45f4e4b0e7e1657520.tar.gz
Promote runcon to android (and add an android menu).
Diffstat (limited to 'toys/pending/runcon.c')
-rw-r--r--toys/pending/runcon.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/toys/pending/runcon.c b/toys/pending/runcon.c
deleted file mode 100644
index b916b424..00000000
--- a/toys/pending/runcon.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* runcon.c - Run command in specified security context
- *
- * Copyright 2015 The Android Open Source Project
-
-USE_RUNCON(NEWTOY(runcon, "<2", TOYFLAG_USR|TOYFLAG_SBIN))
-
-config RUNCON
- bool "runcon"
- depends on TOYBOX_SELINUX
- default n
- help
- usage: runcon CONTEXT COMMAND [ARGS...]
-
- Run a command in a specified security context.
-*/
-
-#define FOR_runcon
-#include "toys.h"
-
-void runcon_main(void)
-{
- char *context = *toys.optargs;
-
- if (setexeccon(context)) perror_exit("Could not set context to %s", context);
-
- xexec(++toys.optargs);
-}