Bug 490125

Summary: warnquota.c config parsing bug
Product: [Fedora] Fedora Reporter: Johannes Russek <johannes.russek>
Component: quotaAssignee: Ondrej Vasik <ovasik>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: kdudka, ovasik
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 3.16-7.fc10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-13 13:42:46 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:

Description Johannes Russek 2009-03-13 13:11:31 UTC
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.16-6.fc10
quota-3.13-1.2.3.2 (for EL5)

How reproducible:
always

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 13:42:46 UTC
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 19:43:01 UTC
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.