diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-12 22:10:25 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-12 22:10:25 +0000 |
commit | 4e6c8120a53709c4a352db42e997303844c74584 (patch) | |
tree | 67494852dbb86ff0c25f161181bca156cd9a612e /libbb | |
parent | 35e9c5d83ada1fea40798365a1b4c728f64ded98 (diff) | |
download | busybox-4e6c8120a53709c4a352db42e997303844c74584.tar.gz |
crond: make it NOMMU-capable
function old new delta
safe_setenv4 - 62 +62
ForkJob 472 511 +39
change_identity 21 57 +36
ParseField 564 571 +7
SynchronizeDir 178 176 -2
LogLevel 4 - -4
LogFile 4 - -4
FileBase 4 - -4
DebugOpt 4 - -4
CDir 4 - -4
DeleteFile 141 132 -9
packed_usage 24248 24228 -20
crondlog 157 113 -44
change_identity_e2str 54 - -54
SynchronizeFile 729 671 -58
crond_main 1555 1404 -151
------------------------------------------------------------------------------
(add/remove: 1/6 grow/shrink: 3/6 up/down: 144/-358) Total: -214 bytes
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/change_identity.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/libbb/change_identity.c b/libbb/change_identity.c index b2274e0ae..f19aa8aaa 100644 --- a/libbb/change_identity.c +++ b/libbb/change_identity.c @@ -30,22 +30,12 @@ #include "libbb.h" - /* Become the user and group(s) specified by PW. */ -const char *change_identity_e2str(const struct passwd *pw) +void change_identity(const struct passwd *pw) { if (initgroups(pw->pw_name, pw->pw_gid) == -1) - return "cannot set groups"; + bb_perror_msg_and_die("can't set groups"); endgrent(); /* ?? */ xsetgid(pw->pw_gid); xsetuid(pw->pw_uid); - return NULL; -} - -void change_identity(const struct passwd *pw) -{ - const char *err_msg = change_identity_e2str(pw); - - if (err_msg) - bb_simple_perror_msg_and_die(err_msg); } |