From d7a805efafd83203e72c334089c3f88204231ac7 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 3 Dec 2008 19:05:55 +0000 Subject: libbb: introduce and use xgetpwnam. ~ -150 bytes. --- loginutils/su.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'loginutils/su.c') 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) openlog(applet_name, 0, LOG_AUTH); } - pw = getpwnam(opt_username); - if (!pw) - bb_error_msg_and_die("unknown id: %s", opt_username); + pw = xgetpwnam(opt_username); /* Make sure pw->pw_shell is non-NULL. It may be NULL when NEW_USER is a username that is retrieved via NIS (YP), but that doesn't have -- cgit v1.2.3