From fdfdc0e8f970963f67520dc74c2ba5e3285a5970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Thu, 26 Sep 2024 14:16:41 +0200 Subject: [PATCH] Add `increase_max_crontabs.patch` Resolves: RHEL-60279 --- cronie.spec | 9 ++++++++- increase_max_crontabs.patch | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 increase_max_crontabs.patch diff --git a/cronie.spec b/cronie.spec index 1421368..b2887b7 100644 --- a/cronie.spec +++ b/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 @@ -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-60279 + * Thu Nov 30 2023 Ondřej Pohořelský - 1.5.7-11 - Add `optimization_to_close_fds.patch` - Resolves: RHEL-17710 diff --git a/increase_max_crontabs.patch b/increase_max_crontabs.patch new file mode 100644 index 0000000..41ade60 --- /dev/null +++ b/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 */ +