Fix #602643 - logrotate "size" directive cannot exceed 1895825408 bytes.

This commit is contained in:
Jan Kaluža 2010-06-10 12:05:12 +00:00
parent 66e5c663df
commit 9fabecb9f0
2 changed files with 49 additions and 1 deletions

View File

@ -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;

View File

@ -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 <jkaluza@redhat.com> 3.7.8-10
- fix #602643 - logrotate "size" directive cannot exceed
1895825408 bytes
* Tue Apr 20 2010 Daniel Novotny <dnovotny@redhat.com> 3.7.8-9
- revert the "create 0640 root adm" permission change (#489038)