From fad2b86c9e7eaadb973b50a1bc0e2accc1a96cfd Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 31 May 2007 22:16:38 +0000 Subject: use "glibc errno" trick not only for ash, but for entire busybox (add/remove: 1/1 grow/shrink: 37/37 up/down: 139/-228) Total: -89 bytes --- libbb/run_shell.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'libbb/run_shell.c') 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 @@ * SUCH DAMAGE. */ -#include -#include -#include -#include -#include -#include -#include #include "libbb.h" -#ifdef CONFIG_SELINUX +#if ENABLE_SELINUX #include /* for setexeccon */ #endif -#ifdef CONFIG_SELINUX +#if ENABLE_SELINUX static security_context_t current_sid; void @@ -90,7 +83,7 @@ void run_shell(const char *shell, int loginshell, const char *command, const cha args[argno++] = *additional_args; } args[argno] = NULL; -#ifdef CONFIG_SELINUX +#if ENABLE_SELINUX if (current_sid && !setexeccon(current_sid)) { freecon(current_sid); execve(shell, (char **) args, environ); -- cgit v1.2.3