Skip to content

Commit

Permalink
crond: Do not abort loading crontab prematurely in case of error
Browse files Browse the repository at this point in the history
  • Loading branch information
t8m committed Mar 18, 2019
1 parent 754f304 commit 425b2da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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:
Expand Down

0 comments on commit 425b2da

Please # to comment.