summaryrefslogtreecommitdiff
path: root/miscutils/crontab.c
diff options
context:
space:
mode:
authorDenis Vlasenko2008-12-03 19:05:55 +0000
committerDenis Vlasenko2008-12-03 19:05:55 +0000
commitd7a805efafd83203e72c334089c3f88204231ac7 (patch)
treed69521a26d050432f89cf5713aa1516f655b136f /miscutils/crontab.c
parentac1c96f6737799d1d7f85515237df80e9da71346 (diff)
downloadbusybox-d7a805efafd83203e72c334089c3f88204231ac7.zip
busybox-d7a805efafd83203e72c334089c3f88204231ac7.tar.gz
libbb: introduce and use xgetpwnam. ~ -150 bytes.
Diffstat (limited to 'miscutils/crontab.c')
-rw-r--r--miscutils/crontab.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/miscutils/crontab.c b/miscutils/crontab.c
index 9020149..13dfd77 100644
--- a/miscutils/crontab.c
+++ b/miscutils/crontab.c
@@ -126,9 +126,7 @@ int crontab_main(int argc UNUSED_PARAM, char **argv)
}
if (opt_ler & OPT_u) {
- pas = getpwnam(user_name);
- if (!pas)
- bb_error_msg_and_die("user %s is not known", user_name);
+ pas = xgetpwnam(user_name);
} else {
pas = xgetpwuid(getuid());
}