Bug 490125 - warnquota.c config parsing bug
Summary: warnquota.c config parsing bug
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: quota
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-13 13:11 UTC by Johannes Russek
Modified: 2009-03-16 19:43 UTC (History)
2 users (show)

Fixed In Version: 3.16-7.fc10
Clone Of:
Environment:
Last Closed: 2009-03-13 13:42:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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