libbb: introduce and use xgetpwnam. ~ -150 bytes.

This commit is contained in:
Denis Vlasenko
2008-12-03 19:05:55 +00:00
parent ac1c96f673
commit d7a805efaf
8 changed files with 17 additions and 20 deletions

View File

@ -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());
}