diff --git a/SOURCES/increase_max_crontabs.patch b/SOURCES/increase_max_crontabs.patch new file mode 100644 index 0000000..41ade60 --- /dev/null +++ b/SOURCES/increase_max_crontabs.patch @@ -0,0 +1,25 @@ +From 36bb94cceda71c83ca01be22a959d8bf3e59b37b 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/SPECS/cronie.spec b/SPECS/cronie.spec index 1421368..8d910ea 100644 --- a/SPECS/cronie.spec +++ b/SPECS/cronie.spec @@ -6,7 +6,7 @@ Summary: Cron daemon for executing programs at set times Name: cronie Version: 1.5.7 -Release: 11%{?dist} +Release: 12%{?dist} License: MIT and BSD and ISC and GPLv2+ URL: https://github.com/cronie-crond/cronie Source0: https://github.com/cronie-crond/cronie/releases/download/cronie-%{version}/cronie-%{version}.tar.gz @@ -23,6 +23,9 @@ Patch: n_option.patch # Optimization to close fds from /proc/self/fd in case of high nofile limit after fork # https://github.com/cronie-crond/cronie/commit/e3682c7135b9176b60d226c60ee4e78cf1ab711b Patch: optimization_to_close_fds.patch +# Increase the maximum number of crontab entries +# https://github.com/cronie-crond/cronie/pull/92/commits/36bb94cceda71c83ca01be22a959d8bf3e59b37b +Patch: increase_max_crontabs.patch Requires: dailyjobs @@ -40,7 +43,7 @@ Buildrequires: audit-libs-devel >= 1.4.1 BuildRequires: gcc BuildRequires: systemd -BuildRequires: make +BuildRequires: make Obsoletes: %{name}-sysvinit Requires(post): coreutils sed @@ -217,6 +220,10 @@ exit 0 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cron.d/dailyjobs %changelog +* Thu Sep 26 2024 Ondřej Pohořelský - 1.5.7-12 +- Add `increase_max_crontabs.patch` +- Resolves: RHEL-60278 + * Thu Nov 30 2023 Ondřej Pohořelský - 1.5.7-11 - Add `optimization_to_close_fds.patch` - Resolves: RHEL-17710