summaryrefslogtreecommitdiff
path: root/loginutils/su.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-12-03 19:05:55 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-12-03 19:05:55 +0000
commitd7a805efafd83203e72c334089c3f88204231ac7 (patch)
treed69521a26d050432f89cf5713aa1516f655b136f /loginutils/su.c
parentac1c96f6737799d1d7f85515237df80e9da71346 (diff)
downloadbusybox-w32-d7a805efafd83203e72c334089c3f88204231ac7.tar.gz
busybox-w32-d7a805efafd83203e72c334089c3f88204231ac7.tar.bz2
busybox-w32-d7a805efafd83203e72c334089c3f88204231ac7.zip
libbb: introduce and use xgetpwnam. ~ -150 bytes.
Diffstat (limited to 'loginutils/su.c')
-rw-r--r--loginutils/su.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/loginutils/su.c b/loginutils/su.c
index 61039d823..e7e0001c7 100644
--- a/loginutils/su.c
+++ b/loginutils/su.c
@@ -48,9 +48,7 @@ int su_main(int argc UNUSED_PARAM, char **argv)
48 openlog(applet_name, 0, LOG_AUTH); 48 openlog(applet_name, 0, LOG_AUTH);
49 } 49 }
50 50
51 pw = getpwnam(opt_username); 51 pw = xgetpwnam(opt_username);
52 if (!pw)
53 bb_error_msg_and_die("unknown id: %s", opt_username);
54 52
55 /* Make sure pw->pw_shell is non-NULL. It may be NULL when NEW_USER 53 /* Make sure pw->pw_shell is non-NULL. It may be NULL when NEW_USER
56 is a username that is retrieved via NIS (YP), but that doesn't have 54 is a username that is retrieved via NIS (YP), but that doesn't have