diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/error_msg.c | 4 | ||||
-rw-r--r-- | libbb/perror_msg.c | 4 | ||||
-rw-r--r-- | libbb/run_shell.c | 13 | ||||
-rw-r--r-- | libbb/safe_write.c | 5 |
4 files changed, 3 insertions, 23 deletions
diff --git a/libbb/error_msg.c b/libbb/error_msg.c index b2141f3..5f53f03 100644 --- a/libbb/error_msg.c +++ b/libbb/error_msg.c @@ -7,10 +7,6 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#include <stdio.h> -#include <errno.h> -#include <string.h> -#include <stdlib.h> #include "libbb.h" void bb_error_msg(const char *s, ...) diff --git a/libbb/perror_msg.c b/libbb/perror_msg.c index 7fb0830..5145795 100644 --- a/libbb/perror_msg.c +++ b/libbb/perror_msg.c @@ -7,10 +7,6 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#include <stdio.h> -#include <errno.h> -#include <string.h> -#include <stdlib.h> #include "libbb.h" void bb_perror_msg(const char *s, ...) diff --git a/libbb/run_shell.c b/libbb/run_shell.c index 6be0908..25d55dd 100644 --- a/libbb/run_shell.c +++ b/libbb/run_shell.c @@ -28,19 +28,12 @@ * SUCH DAMAGE. */ -#include <stdio.h> -#include <errno.h> -#include <unistd.h> -#include <string.h> -#include <stdlib.h> -#include <syslog.h> -#include <ctype.h> #include "libbb.h" -#ifdef CONFIG_SELINUX +#if ENABLE_SELINUX #include <selinux/selinux.h> /* 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); diff --git a/libbb/safe_write.c b/libbb/safe_write.c index c81f124..5bbb82e 100644 --- a/libbb/safe_write.c +++ b/libbb/safe_write.c @@ -7,13 +7,8 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#include <stdio.h> -#include <errno.h> -#include <unistd.h> #include "libbb.h" - - ssize_t safe_write(int fd, const void *buf, size_t count) { ssize_t n; |