From 9fabecb9f00ae07f6df59a27b082bf205ad365d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kalu=C5=BEa?= Date: Thu, 10 Jun 2010 12:05:12 +0000 Subject: [PATCH] Fix #602643 - logrotate "size" directive cannot exceed 1895825408 bytes. --- logrotate-3.7.8-configsize.patch | 42 ++++++++++++++++++++++++++++++++ logrotate.spec | 8 +++++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 logrotate-3.7.8-configsize.patch diff --git a/logrotate-3.7.8-configsize.patch b/logrotate-3.7.8-configsize.patch new file mode 100644 index 0000000..8a3aa6d --- /dev/null +++ b/logrotate-3.7.8-configsize.patch @@ -0,0 +1,42 @@ +Index: /trunk/logrotate.c +=================================================================== +--- /trunk/logrotate.c (revision 273) ++++ /trunk/logrotate.c (revision 276) +@@ -1199,5 +1199,5 @@ + switch (log->criterium) { + case ROT_DAYS: +- message(MESS_DEBUG, "after %d days ", log->threshhold); ++ message(MESS_DEBUG, "after %llu days ", log->threshhold); + break; + case ROT_WEEKLY: +@@ -1211,5 +1211,5 @@ + break; + case ROT_SIZE: +- message(MESS_DEBUG, "%d bytes ", log->threshhold); ++ message(MESS_DEBUG, "%llu bytes ", log->threshhold); + break; + case ROT_FORCE: +Index: /trunk/logrotate.h +=================================================================== +--- /trunk/logrotate.h (revision 248) ++++ /trunk/logrotate.h (revision 276) +@@ -34,6 +34,6 @@ + enum { ROT_DAYS, ROT_WEEKLY, ROT_MONTHLY, ROT_YEARLY, ROT_SIZE, + ROT_FORCE } criterium; +- unsigned int threshhold; +- unsigned int minsize; ++ unsigned long long threshhold; ++ unsigned long long minsize; + int rotateCount; + int rotateAge; +Index: /trunk/config.c +=================================================================== +--- /trunk/config.c (revision 274) ++++ /trunk/config.c (revision 276) +@@ -794,5 +794,5 @@ + *endtag = oldchar, start = endtag; + } else if (!strcmp(start, "size") || !strcmp(start, "minsize")) { +- unsigned int size = 0; ++ unsigned long long size = 0; + char *opt = start; + *endtag = oldchar, start = endtag; diff --git a/logrotate.spec b/logrotate.spec index 1dae09d..e263919 100644 --- a/logrotate.spec +++ b/logrotate.spec @@ -1,7 +1,7 @@ Summary: Rotates, compresses, removes and mails system log files Name: logrotate Version: 3.7.8 -Release: 9%{?dist} +Release: 10%{?dist} License: GPL+ Group: System Environment/Base Source: https://fedorahosted.org/releases/l/o/logrotate/logrotate-%{version}.tar.gz @@ -12,6 +12,7 @@ Patch4: logrotate-3.7.8-man5.patch Patch5: logrotate-3.7.8-readonly.patch #Patch6: logrotate-3.7.8-perm.patch Patch7: logrotate-3.7.8-missingok.patch +Patch8: logrotate-3.7.8-configsize.patch Requires: coreutils >= 5.92 libsepol libselinux popt BuildRequires: libselinux-devel popt-devel @@ -37,6 +38,7 @@ log files on your system. %patch5 -p1 -b .readonly #%%patch6 -p1 -b .perm %patch7 -p1 -b .missingok +%patch8 -p2 -b .configsize %build make %{?_smp_mflags} RPM_OPT_FLAGS="$RPM_OPT_FLAGS" WITH_SELINUX=yes @@ -67,6 +69,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644, root, root) %verify(not size md5 mtime) %config(noreplace) %{_localstatedir}/lib/logrotate.status %changelog +* Tue Apr 20 2010 Jan Kaluza 3.7.8-10 +- fix #602643 - logrotate "size" directive cannot exceed + 1895825408 bytes + * Tue Apr 20 2010 Daniel Novotny 3.7.8-9 - revert the "create 0640 root adm" permission change (#489038)