From 4ec70429f526f64cf6c3ac99e0d30a35c28669824036549d832df09dce0d75fe Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 5 Nov 2019 14:16:20 +0000 Subject: [PATCH] Accepting request 744805 from home:kstreitova:branches:Base:System - update to 1.5.5 * Avoid warning for strncat. * crontab: fsync to check for full disk * crontab: Add Y/N to retry prompt * entries: Explicitly validate upper ranges and steps * crond: report missing newline before EOF * do not log carriage return * skip directories when given as crontabs * crontab -l colors comment lines in a different color * getdtablesize() can return very high values in containers * Power supply name not detected correctly. * Revert "Avoid creating pid files when crond doesn't fork" * anacron: fix types in comparisons * mics: stop using plain integer as NULL pointer * cron: fix type in comparison and variable shadowing * cron: mark signal number arguments in signal handlers unused * Move allowed() and related function to security.c * cronnext: optionally select jobs by substring * crond: Do not abort loading crontab prematurely in case of error - refresh cronie-nheader_lines.diff - remove cronie-1.5.4-dont_abort_loading_crontab.patch and cronie-1.5.4-always_create_pid_file.patch (applied upstream) OBS-URL: https://build.opensuse.org/request/show/744805 OBS-URL: https://build.opensuse.org/package/show/Base:System/cronie?expand=0&rev=181 --- cronie-1.5.4-always_create_pid_file.patch | 26 -------------- cronie-1.5.4-dont_abort_loading_crontab.patch | 34 ------------------- cronie-1.5.4.tar.gz | 3 -- cronie-1.5.5.tar.gz | 3 ++ cronie-nheader_lines.diff | 12 +++---- cronie.changes | 26 ++++++++++++++ cronie.spec | 6 +--- 7 files changed, 36 insertions(+), 74 deletions(-) delete mode 100644 cronie-1.5.4-always_create_pid_file.patch delete mode 100644 cronie-1.5.4-dont_abort_loading_crontab.patch delete mode 100644 cronie-1.5.4.tar.gz create mode 100644 cronie-1.5.5.tar.gz diff --git a/cronie-1.5.4-always_create_pid_file.patch b/cronie-1.5.4-always_create_pid_file.patch deleted file mode 100644 index 5531566..0000000 --- a/cronie-1.5.4-always_create_pid_file.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0570c2cd979bc9ce1da6a873089e89dbca900a1f Mon Sep 17 00:00:00 2001 -From: Tomas Mraz -Date: Tue, 7 May 2019 14:45:53 +0200 -Subject: [PATCH] Revert "Avoid creating pid files when crond doesn't fork" - -This reverts commit 5b285b46b88dc63689c6a56542cb2ba81f861b66. -The PID file is useful to avoid running multiple crond instances -at once. ---- - src/misc.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/src/misc.c b/src/misc.c -index 42153b8..faf6ffb 100644 ---- a/src/misc.c -+++ b/src/misc.c -@@ -315,9 +315,6 @@ void acquire_daemonlock(int closeflag) { - return; - } - -- if (NoFork == 1) -- return; //move along, nothing to do here... -- - if (fd == -1) { - pidfile = _PATH_CRON_PID; - /* Initial mode is 0600 to prevent flock() race/DoS. */ diff --git a/cronie-1.5.4-dont_abort_loading_crontab.patch b/cronie-1.5.4-dont_abort_loading_crontab.patch deleted file mode 100644 index 1ce75d5..0000000 --- a/cronie-1.5.4-dont_abort_loading_crontab.patch +++ /dev/null @@ -1,34 +0,0 @@ -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: diff --git a/cronie-1.5.4.tar.gz b/cronie-1.5.4.tar.gz deleted file mode 100644 index 84dede4..0000000 --- a/cronie-1.5.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:87661b49269c82d437156921fd3385dae14cb316071aa7903faa00a5ea05c13f -size 122452 diff --git a/cronie-1.5.5.tar.gz b/cronie-1.5.5.tar.gz new file mode 100644 index 0000000..1e78480 --- /dev/null +++ b/cronie-1.5.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22c2a2b22577c0f776c1268d0e0f305c5c041e10155022a345b43b665da0ffe9 +size 124642 diff --git a/cronie-nheader_lines.diff b/cronie-nheader_lines.diff index 57beb41..60ad80d 100644 --- a/cronie-nheader_lines.diff +++ b/cronie-nheader_lines.diff @@ -9,9 +9,9 @@ Index: src/crontab.c -#define NHEADER_LINES 0 +#define NHEADER_LINES 3 - enum opt_t {opt_unknown, opt_list, opt_delete, opt_edit, opt_replace, opt_hostset, opt_hostget}; - -@@ -485,7 +485,7 @@ static void edit_cmd(void) { + #define COMMENT_COLOR "\x1B[34m" + #define RESET_COLOR "\033[0m" +@@ -500,7 +500,7 @@ static void edit_cmd(void) { char n[MAX_FNAME], q[MAX_TEMPSTR]; const char *editor; FILE *f; @@ -20,7 +20,7 @@ Index: src/crontab.c struct stat statbuf; struct utimbuf utimebuf; WAIT_T waiter; -@@ -537,13 +537,25 @@ static void edit_cmd(void) { +@@ -552,13 +552,25 @@ static void edit_cmd(void) { } Set_LineNum(1) @@ -53,7 +53,7 @@ Index: src/crontab.c while (EOF != (ch = get_char(f))) putc(ch, NewCrontab); -@@ -751,6 +763,7 @@ static int replace_cmd(void) { +@@ -766,6 +778,7 @@ static int replace_cmd(void) { int error = 0; entry *e; uid_t file_owner; @@ -61,7 +61,7 @@ Index: src/crontab.c char **envp; char *safename; int envs = 0, entries = 0; -@@ -781,10 +794,10 @@ static int replace_cmd(void) { +@@ -796,10 +809,10 @@ static int replace_cmd(void) { * * VERY IMPORTANT: make sure NHEADER_LINES agrees with this code. */ diff --git a/cronie.changes b/cronie.changes index f768179..927ffb6 100644 --- a/cronie.changes +++ b/cronie.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Fri Nov 1 17:10:22 UTC 2019 - Kristyna Streitova + +- update to 1.5.5 + * Avoid warning for strncat. + * crontab: fsync to check for full disk + * crontab: Add Y/N to retry prompt + * entries: Explicitly validate upper ranges and steps + * crond: report missing newline before EOF + * do not log carriage return + * skip directories when given as crontabs + * crontab -l colors comment lines in a different color + * getdtablesize() can return very high values in containers + * Power supply name not detected correctly. + * Revert "Avoid creating pid files when crond doesn't fork" + * anacron: fix types in comparisons + * mics: stop using plain integer as NULL pointer + * cron: fix type in comparison and variable shadowing + * cron: mark signal number arguments in signal handlers unused + * Move allowed() and related function to security.c + * cronnext: optionally select jobs by substring + * crond: Do not abort loading crontab prematurely in case of error +- refresh cronie-nheader_lines.diff +- remove cronie-1.5.4-dont_abort_loading_crontab.patch and + cronie-1.5.4-always_create_pid_file.patch (applied upstream) + ------------------------------------------------------------------- Tue Aug 27 12:24:27 UTC 2019 - Kristyna Streitova diff --git a/cronie.spec b/cronie.spec index e4eb6a5..6a189f2 100644 --- a/cronie.spec +++ b/cronie.spec @@ -23,7 +23,7 @@ %define cron_configs %{_sysconfdir}/pam.d/crond %{_sysconfdir}/crontab %{_sysconfdir}/cron.deny Name: cronie -Version: 1.5.4 +Version: 1.5.5 Release: 0 Summary: Cron Daemon License: BSD-3-Clause AND GPL-2.0-only AND MIT @@ -51,8 +51,6 @@ Patch12: cronie-piddir.patch # PATCH-FIX-SUSE the first occurance of "/etc/anacrontab" was replaced by "/etc/crontab" # in manpage file because the /etc/crontab is still used in SUSE. Patch13: fix-manpage-replace-anacrontab-with-crontab.patch -Patch14: cronie-1.5.4-dont_abort_loading_crontab.patch -Patch15: cronie-1.5.4-always_create_pid_file.patch BuildRequires: audit-devel BuildRequires: autoconf BuildRequires: automake @@ -113,8 +111,6 @@ overloaded in settings. cp %{SOURCE7} ./cron_to_cronie.README %patch12 -p1 %patch13 -p1 -%patch14 -p1 -%patch15 -p1 %build # fill macro CRON_VERSION it is used in top three lines of crontab file,should be reworked