aboutsummaryrefslogtreecommitdiff
path: root/miscutils/crontab.c
diff options
context:
space:
mode:
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 902014963..13dfd77ad 100644
--- a/miscutils/crontab.c
+++ b/miscutils/crontab.c
@@ -126,9 +126,7 @@ int crontab_main(int argc UNUSED_PARAM, char **argv)
126 } 126 }
127 127
128 if (opt_ler & OPT_u) { 128 if (opt_ler & OPT_u) {
129 pas = getpwnam(user_name); 129 pas = xgetpwnam(user_name);
130 if (!pas)
131 bb_error_msg_and_die("user %s is not known", user_name);
132 } else { 130 } else {
133 pas = xgetpwuid(getuid()); 131 pas = xgetpwuid(getuid());
134 } 132 }