Bug 221341

Summary: "size" option effectively ignored in config files
Product: [Fedora] Fedora Reporter: Paul B Schroeder <pschroeder>
Component: logrotateAssignee: Peter Vrabec <pvrabec>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-01-05 12:15:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
quick workaround patch
none
I suggest using this patch. none

Description Paul B Schroeder 2007-01-03 22:13:55 UTC
Description of problem:
the "size" config file option is not being honored correctly.  When size is
specified, it would always set it to 1M and would not be overridden.

Version-Release number of selected component (if applicable):
logrotate-3.7.4-7

How reproducible:
instead of using "daily" or "weekly" try using "size 100" or whatnot.

Steps to Reproduce:
1. set "size 100" option in the config file
2. run logrotate -d /etc/logrotate.conf
3. you'll see files greater than 100 bytes not being rotated
  
Actual results:
log files above "size" are not rotated

Expected results:
those files should be rotated

Additional info:
created quick patch.  The problem appears to be in config.c where is does a
strcmp on the "opt" variable to determine if it is seeing "size" or "minsize". 
Improper because the "size" text has been removed from "opt" at this point.  So
the patch does the check immediately.  Should be obvious in the patch..

Comment 1 Paul B Schroeder 2007-01-03 22:13:55 UTC
Created attachment 144746 [details]
quick workaround patch

Comment 2 Peter Vrabec 2007-01-04 15:31:47 UTC
Created attachment 144803 [details]
I suggest using this patch.

Comment 3 Peter Vrabec 2007-01-05 12:15:31 UTC
fixed in
logrotate-3.7.4-8.fc6(testing)
logrotate-3.7.4-8.fc7