Bug 221341 - "size" option effectively ignored in config files
"size" option effectively ignored in config files
Product: Fedora
Classification: Fedora
Component: logrotate (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Vrabec
Depends On:
  Show dependency treegraph
Reported: 2007-01-03 17:13 EST by Paul B Schroeder
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-01-05 07:15:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Paul B Schroeder 2007-01-03 17:13:55 EST
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):

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 17:13:55 EST
Created attachment 144746 [details]
quick workaround patch
Comment 2 Peter Vrabec 2007-01-04 10:31:47 EST
Created attachment 144803 [details]
I suggest using this patch.
Comment 3 Peter Vrabec 2007-01-05 07:15:31 EST
fixed in

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