Bug 490125 - warnquota.c config parsing bug
warnquota.c config parsing bug
Product: Fedora
Classification: Fedora
Component: quota (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-03-13 09:11 EDT by Johannes Russek
Modified: 2009-03-16 15:43 EDT (History)
2 users (show)

See Also:
Fixed In Version: 3.16-7.fc10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-03-13 09:42:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Johannes Russek 2009-03-13 09:11:31 EDT
Description of problem:
small bug in config file parsing makes config example always fail with LDAP_MAIL = true.
the problem is in warnquota.c on line 800:

if(strcasecmp(value, "true") == 0)

since the example is:

LDAP_MAIL = false # or false if you don't want to use it

people will usually just change the false to true. This is not going to work since the variable "value" contains the string "true # or false if you don't want to use it".

removing the comment fixes it temporarily, better would be using

if(strncasecmp(value, "true", 4) == 0)

which will ignore everything after "true".
The same bug is in 3.13 as found in EL5

Version-Release number of selected component (if applicable):
quota-3.13- (for EL5)

How reproducible:

Steps to Reproduce:
use a quota package with compiled in ldapmail support (see bug #490106), and just replace the false with true in the LDAP_MAIL line in the config file
Comment 1 Ondrej Vasik 2009-03-13 09:42:46 EDT
Thanks for report/suggestion, fixed in Rawhide again ... built as quota-3.17-4.fc11 ... will be part of next F-10 quota update with #490106 fix... closing RAWHIDE now...
Comment 2 Fedora Update System 2009-03-16 15:43:01 EDT
quota-3.16-7.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

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