aboutsummaryrefslogtreecommitdiff
path: root/libbb/run_shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/run_shell.c')
-rw-r--r--libbb/run_shell.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/libbb/run_shell.c b/libbb/run_shell.c
index 6be09088d..25d55dd63 100644
--- a/libbb/run_shell.c
+++ b/libbb/run_shell.c
@@ -28,19 +28,12 @@
28 * SUCH DAMAGE. 28 * SUCH DAMAGE.
29 */ 29 */
30 30
31#include <stdio.h>
32#include <errno.h>
33#include <unistd.h>
34#include <string.h>
35#include <stdlib.h>
36#include <syslog.h>
37#include <ctype.h>
38#include "libbb.h" 31#include "libbb.h"
39#ifdef CONFIG_SELINUX 32#if ENABLE_SELINUX
40#include <selinux/selinux.h> /* for setexeccon */ 33#include <selinux/selinux.h> /* for setexeccon */
41#endif 34#endif
42 35
43#ifdef CONFIG_SELINUX 36#if ENABLE_SELINUX
44static security_context_t current_sid; 37static security_context_t current_sid;
45 38
46void 39void
@@ -90,7 +83,7 @@ void run_shell(const char *shell, int loginshell, const char *command, const cha
90 args[argno++] = *additional_args; 83 args[argno++] = *additional_args;
91 } 84 }
92 args[argno] = NULL; 85 args[argno] = NULL;
93#ifdef CONFIG_SELINUX 86#if ENABLE_SELINUX
94 if (current_sid && !setexeccon(current_sid)) { 87 if (current_sid && !setexeccon(current_sid)) {
95 freecon(current_sid); 88 freecon(current_sid);
96 execve(shell, (char **) args, environ); 89 execve(shell, (char **) args, environ);