Bug 221341 - "size" option effectively ignored in config files
Summary: "size" option effectively ignored in config files
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: logrotate
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-01-03 22:13 UTC by Paul B Schroeder
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-01-05 12:15:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
quick workaround patch (750 bytes, patch)
2007-01-03 22:13 UTC, Paul B Schroeder
no flags Details | Diff
I suggest using this patch. (339 bytes, patch)
2007-01-04 15:31 UTC, Peter Vrabec
no flags Details | Diff

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


Note You need to log in before you can comment on or make changes to this bug.