summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenis Vlasenko2008-12-03 19:05:55 +0000
committerDenis Vlasenko2008-12-03 19:05:55 +0000
commitd7a805efafd83203e72c334089c3f88204231ac7 (patch)
treed69521a26d050432f89cf5713aa1516f655b136f /coreutils
parentac1c96f6737799d1d7f85515237df80e9da71346 (diff)
downloadbusybox-d7a805efafd83203e72c334089c3f88204231ac7.zip
busybox-d7a805efafd83203e72c334089c3f88204231ac7.tar.gz
libbb: introduce and use xgetpwnam. ~ -150 bytes.
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/id.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/coreutils/id.c b/coreutils/id.c
index 33e06f4..43f403f 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -124,9 +124,7 @@ int id_main(int argc UNUSED_PARAM, char **argv)
username = argv[optind];
if (username) {
- struct passwd *p = getpwnam(username);
- if (!p)
- bb_error_msg_and_die("unknown user %s", username);
+ struct passwd *p = xgetpwnam(username);
euid = ruid = p->pw_uid;
egid = rgid = p->pw_gid;
} else {