cronie/cronie-1.5.4-dont_abort_loading_crontab.patch
Kristyna Streitova 8e8fb60fcc Accepting request 689903 from home:kstreitova:branches:Base:System
- update to 1.5.4
  * crond: Fix regression from previous release. Only first job
    from a crontab was being run [bsc#1130746]
- add cronie-1.5.4-dont_abort_loading_crontab.patch to not abort
  loading crontab prematurely in case of error

OBS-URL: https://build.opensuse.org/request/show/689903
OBS-URL: https://build.opensuse.org/package/show/Base:System/cronie?expand=0&rev=173
2019-04-01 08:55:57 +00:00

35 lines
973 B
Diff

From 425b2da28d61b701b6016e57a690c6c55d2b8d4a Mon Sep 17 00:00:00 2001
From: Tomas Mraz <tmraz@fedoraproject.org>
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: