Fix #602643 - logrotate "size" directive cannot exceed 1895825408 bytes.
This commit is contained in:
		
							parent
							
								
									66e5c663df
								
							
						
					
					
						commit
						9fabecb9f0
					
				
							
								
								
									
										42
									
								
								logrotate-3.7.8-configsize.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								logrotate-3.7.8-configsize.patch
									
									
									
									
									
										Normal 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;
 | 
				
			||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
Summary: Rotates, compresses, removes and mails system log files
 | 
					Summary: Rotates, compresses, removes and mails system log files
 | 
				
			||||||
Name: logrotate
 | 
					Name: logrotate
 | 
				
			||||||
Version: 3.7.8
 | 
					Version: 3.7.8
 | 
				
			||||||
Release: 9%{?dist}
 | 
					Release: 10%{?dist}
 | 
				
			||||||
License: GPL+
 | 
					License: GPL+
 | 
				
			||||||
Group: System Environment/Base
 | 
					Group: System Environment/Base
 | 
				
			||||||
Source: https://fedorahosted.org/releases/l/o/logrotate/logrotate-%{version}.tar.gz
 | 
					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
 | 
					Patch5: logrotate-3.7.8-readonly.patch
 | 
				
			||||||
#Patch6: logrotate-3.7.8-perm.patch
 | 
					#Patch6: logrotate-3.7.8-perm.patch
 | 
				
			||||||
Patch7: logrotate-3.7.8-missingok.patch
 | 
					Patch7: logrotate-3.7.8-missingok.patch
 | 
				
			||||||
 | 
					Patch8: logrotate-3.7.8-configsize.patch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Requires: coreutils >= 5.92 libsepol libselinux popt
 | 
					Requires: coreutils >= 5.92 libsepol libselinux popt
 | 
				
			||||||
BuildRequires: libselinux-devel popt-devel
 | 
					BuildRequires: libselinux-devel popt-devel
 | 
				
			||||||
@ -37,6 +38,7 @@ log files on your system.
 | 
				
			|||||||
%patch5 -p1 -b .readonly
 | 
					%patch5 -p1 -b .readonly
 | 
				
			||||||
#%%patch6 -p1 -b .perm
 | 
					#%%patch6 -p1 -b .perm
 | 
				
			||||||
%patch7 -p1 -b .missingok
 | 
					%patch7 -p1 -b .missingok
 | 
				
			||||||
 | 
					%patch8 -p2 -b .configsize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%build
 | 
					%build
 | 
				
			||||||
make %{?_smp_mflags} RPM_OPT_FLAGS="$RPM_OPT_FLAGS" WITH_SELINUX=yes
 | 
					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
 | 
					%attr(0644, root, root) %verify(not size md5 mtime) %config(noreplace) %{_localstatedir}/lib/logrotate.status
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%changelog
 | 
					%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
 | 
					* Tue Apr 20 2010 Daniel Novotny <dnovotny@redhat.com> 3.7.8-9
 | 
				
			||||||
- revert the "create 0640 root adm" permission change (#489038)
 | 
					- revert the "create 0640 root adm" permission change (#489038)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user