diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-20 15:12:58 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-20 15:12:58 +0000 |
commit | 9230582315a15dd7b95de9f03c48024858ec935d (patch) | |
tree | 5495a94e29baa12c71e33fa8d049131fe572f881 /libbb/change_identity.c | |
parent | c52248e41ce50bd3fa684d19b2bce4320267dc44 (diff) | |
download | busybox-w32-9230582315a15dd7b95de9f03c48024858ec935d.tar.gz busybox-w32-9230582315a15dd7b95de9f03c48024858ec935d.tar.bz2 busybox-w32-9230582315a15dd7b95de9f03c48024858ec935d.zip |
inetd: use change_identity().
libbb: shrink our internal initgroups().
httpd: remove stray 'else' and 'index_page = "index.html"'
function old new delta
httpd_main 750 743 -7
inetd_main 2033 2011 -22
bb_internal_initgroups 251 228 -23
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-52) Total: -52 bytes
Diffstat (limited to 'libbb/change_identity.c')
-rw-r--r-- | libbb/change_identity.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/change_identity.c b/libbb/change_identity.c index f19aa8aaa..da840bfb3 100644 --- a/libbb/change_identity.c +++ b/libbb/change_identity.c | |||
@@ -35,7 +35,7 @@ void change_identity(const struct passwd *pw) | |||
35 | { | 35 | { |
36 | if (initgroups(pw->pw_name, pw->pw_gid) == -1) | 36 | if (initgroups(pw->pw_name, pw->pw_gid) == -1) |
37 | bb_perror_msg_and_die("can't set groups"); | 37 | bb_perror_msg_and_die("can't set groups"); |
38 | endgrent(); /* ?? */ | 38 | endgrent(); /* helps to close a fd used internally by libc */ |
39 | xsetgid(pw->pw_gid); | 39 | xsetgid(pw->pw_gid); |
40 | xsetuid(pw->pw_uid); | 40 | xsetuid(pw->pw_uid); |
41 | } | 41 | } |