diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-04-12 12:31:02 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-04-12 12:31:02 +0000 |
commit | 74cd3ed86d968ecf247f749dcd48ec5a408c9d74 (patch) | |
tree | cf080409fa9b904793fb19d397e7f0d9fb17a936 /libbb | |
parent | 5ce9987c2025ffb8eb0b57fed05744f9d94e9111 (diff) | |
download | busybox-w32-74cd3ed86d968ecf247f749dcd48ec5a408c9d74.tar.gz busybox-w32-74cd3ed86d968ecf247f749dcd48ec5a408c9d74.tar.bz2 busybox-w32-74cd3ed86d968ecf247f749dcd48ec5a408c9d74.zip |
login: remove setpgrp call (makes it work from shell prompt again).
login: sanitize stdio descriptors (we are suid, need to be careful!)
shrink login and set_environment by ~100 bytes.
git-svn-id: svn://busybox.net/trunk/busybox@18416 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/info_msg.c | 4 | ||||
-rw-r--r-- | libbb/setup_environment.c | 15 |
2 files changed, 4 insertions, 15 deletions
diff --git a/libbb/info_msg.c b/libbb/info_msg.c index 78d5c8f32..c763ce60c 100644 --- a/libbb/info_msg.c +++ b/libbb/info_msg.c | |||
@@ -7,10 +7,6 @@ | |||
7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <stdio.h> | ||
11 | #include <errno.h> | ||
12 | #include <string.h> | ||
13 | #include <stdlib.h> | ||
14 | #include "libbb.h" | 10 | #include "libbb.h" |
15 | 11 | ||
16 | void bb_info_msg(const char *s, ...) | 12 | void bb_info_msg(const char *s, ...) |
diff --git a/libbb/setup_environment.c b/libbb/setup_environment.c index 874a58efa..18d5a0610 100644 --- a/libbb/setup_environment.c +++ b/libbb/setup_environment.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 | 32 | ||
40 | 33 | /* util-linux manpage says /sbin:/bin:/usr/sbin:/usr/bin, | |
41 | 34 | * but I want to save a few bytes here */ | |
42 | #define DEFAULT_LOGIN_PATH "/bin:/usr/bin" | 35 | static const char DEFAULT_ROOT_LOGIN_PATH[] = "/sbin:/usr/sbin:/bin:/usr/bin"; |
43 | #define DEFAULT_ROOT_LOGIN_PATH "/usr/sbin:/bin:/usr/bin:/sbin" | 36 | #define DEFAULT_LOGIN_PATH (DEFAULT_ROOT_LOGIN_PATH + sizeof("/sbin:/usr/sbin")) |
44 | 37 | ||
45 | void setup_environment(const char *shell, int loginshell, int changeenv, const struct passwd *pw) | 38 | void setup_environment(const char *shell, int loginshell, int changeenv, const struct passwd *pw) |
46 | { | 39 | { |