]> granicus.if.org Git - cronie/commitdiff
crond: Do not abort loading crontab prematurely in case of error cronie-1.5.4-final
authorTomas Mraz <tmraz@fedoraproject.org>
Mon, 18 Mar 2019 10:38:36 +0000 (11:38 +0100)
committerTomas Mraz <tmraz@fedoraproject.org>
Mon, 18 Mar 2019 10:38:36 +0000 (11:38 +0100)
src/user.c

index 9e12271a0ba04fe031ed19db41d22ce9af7e1c3b..c34d271534d789b3cb1ef2c280117a0807212842 100644 (file)
@@ -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: