From 425b2da28d61b701b6016e57a690c6c55d2b8d4a Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Mon, 18 Mar 2019 11:38:36 +0100 Subject: [PATCH] crond: Do not abort loading crontab prematurely in case of error --- src/user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/user.c b/src/user.c index 9e12271..c34d271 100644 --- a/src/user.c +++ b/src/user.c @@ -116,9 +116,10 @@ load_user (int crontab_fd, struct passwd *pw, const char *uname, #endif /* load the crontab */ - while (status >= TRUE) { + while (status >= OK) { if (!skip_comments(file) && !u->system) { log_error("too many garbage characters"); + status = TRUE; break; } status = load_env (envstr, file); @@ -135,7 +136,6 @@ load_user (int crontab_fd, struct passwd *pw, const char *uname, if (e) { e->next = u->crontab; u->crontab = e; - status = TRUE; } break; case TRUE: