From 0b49c56f4c444288cfdb95245a993d96d7eac544d4b2d6bbf3dd345f8f2f0d10 Mon Sep 17 00:00:00 2001 From: Danilo Spinella Date: Wed, 15 Sep 2021 12:19:01 +0000 Subject: [PATCH] Accepting request 919154 from home:dspinella:branches:Base:System - Increase limit of allowed entries in crontab files to fix bsc#1187508 * cronie-1.5.7-increase_crontab_limit.patch - Run spec-cleaner - Remove cronie-rpmlintrc as the filter was unused OBS-URL: https://build.opensuse.org/request/show/919154 OBS-URL: https://build.opensuse.org/package/show/Base:System/cronie?expand=0&rev=199 --- cronie-1.5.7-increase_crontab_limit.patch | 25 +++++++++++++++++++++++ cronie-rpmlintrc | 4 ---- cronie.changes | 8 ++++++++ cronie.spec | 6 ++++-- 4 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 cronie-1.5.7-increase_crontab_limit.patch delete mode 100644 cronie-rpmlintrc diff --git a/cronie-1.5.7-increase_crontab_limit.patch b/cronie-1.5.7-increase_crontab_limit.patch new file mode 100644 index 0000000..da29a33 --- /dev/null +++ b/cronie-1.5.7-increase_crontab_limit.patch @@ -0,0 +1,25 @@ +From ec8b5e5569b7f95a71ceca224fb4662f5799833e Mon Sep 17 00:00:00 2001 +From: Danilo Spinella +Date: Tue, 13 Jul 2021 17:08:36 +0200 +Subject: [PATCH] Increase the maximum number of crontab entries + +Old limit is considered too low for users with edge cases. + +Fixes #91. +--- + src/macros.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/macros.h b/src/macros.h +index cba5fb2..d50e981 100644 +--- a/src/macros.h ++++ b/src/macros.h +@@ -59,7 +59,7 @@ + #define ROOT_UID 0 /* don't change this, it really must be root */ + #define ROOT_USER "root" /* ditto */ + #define MAX_USER_ENVS 1000 /* maximum environment variables in user's crontab */ +-#define MAX_USER_ENTRIES 1000 /* maximum crontab entries in user's crontab */ ++#define MAX_USER_ENTRIES 10000 /* maximum crontab entries in user's crontab */ + #define MAX_GARBAGE 32768 /* max num of chars of comments and whitespaces between entries */ + #define MAX_CLOSE_FD 10000 /* max fd num to close when spawning a child process */ + diff --git a/cronie-rpmlintrc b/cronie-rpmlintrc deleted file mode 100644 index 560a4d2..0000000 --- a/cronie-rpmlintrc +++ /dev/null @@ -1,4 +0,0 @@ -# This line is mandatory to access the configuration functions -from Config import * - -addFilter("cronie.* incoherent-init-script-name") \ No newline at end of file diff --git a/cronie.changes b/cronie.changes index f2c624e..8605e78 100644 --- a/cronie.changes +++ b/cronie.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Sep 15 12:00:14 UTC 2021 - Danilo Spinella + +- Increase limit of allowed entries in crontab files to fix bsc#1187508 + * cronie-1.5.7-increase_crontab_limit.patch +- Run spec-cleaner +- Remove cronie-rpmlintrc as the filter was unused + ------------------------------------------------------------------- Mon Aug 30 07:18:09 UTC 2021 - Danilo Spinella diff --git a/cronie.spec b/cronie.spec index 6bd0ea3..d7bc67f 100644 --- a/cronie.spec +++ b/cronie.spec @@ -32,7 +32,6 @@ Source0: https://github.com/cronie-crond/%{name}/archive/%{name}-%{versio Source2: run-crons Source3: sample.root Source4: deny.sample -Source6: cronie-rpmlintrc Source7: cron_to_cronie.README Source8: cron.service Source9: sysconfig.cron @@ -48,6 +47,8 @@ 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 +# PATCH-FIX-UPSTREAM Increase the maximum number of crontab entries bsc#1187508 +Patch14: cronie-1.5.7-increase_crontab_limit.patch BuildRequires: audit-devel BuildRequires: autoconf BuildRequires: automake @@ -57,8 +58,8 @@ BuildRequires: pkgconfig BuildRequires: pkgconfig(systemd) Requires: mail Requires(post): %fillup_prereq -Requires(post): permissions Requires(post): debianutils +Requires(post): permissions Requires(pre): cron Suggests: mailx Conflicts: cron <= 4.1 @@ -107,6 +108,7 @@ overloaded in settings. cp %{SOURCE7} ./cron_to_cronie.README %patch12 -p1 %patch13 -p1 +%patch14 -p1 %build # fill macro CRON_VERSION it is used in top three lines of crontab file,should be reworked