diff options
author | Denis Vlasenko | 2008-12-03 19:05:55 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-12-03 19:05:55 +0000 |
commit | d7a805efafd83203e72c334089c3f88204231ac7 (patch) | |
tree | d69521a26d050432f89cf5713aa1516f655b136f /loginutils/passwd.c | |
parent | ac1c96f6737799d1d7f85515237df80e9da71346 (diff) | |
download | busybox-d7a805efafd83203e72c334089c3f88204231ac7.zip busybox-d7a805efafd83203e72c334089c3f88204231ac7.tar.gz |
libbb: introduce and use xgetpwnam. ~ -150 bytes.
Diffstat (limited to 'loginutils/passwd.c')
-rw-r--r-- | loginutils/passwd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/loginutils/passwd.c b/loginutils/passwd.c index e3e74ba..aa89b87 100644 --- a/loginutils/passwd.c +++ b/loginutils/passwd.c @@ -118,9 +118,7 @@ int passwd_main(int argc UNUSED_PARAM, char **argv) myname = xstrdup(xuid2uname(myuid)); name = argv[0] ? argv[0] : myname; - pw = getpwnam(name); - if (!pw) - bb_error_msg_and_die("unknown user %s", name); + pw = xgetpwnam(name); if (myuid && pw->pw_uid != myuid) { /* LOGMODE_BOTH */ bb_error_msg_and_die("%s can't change password for %s", myname, name); |