[Date Prev][Date Next] [Chronological] [Thread] [Top]

Probable bug in use of strcasecmp in servers/slapd/acl.c (ITS#1516)

Full_Name: Mark Blackman
Version: 2.0.19
OS: FreeBSD 4.4
URL: http://www.users.dircon.co.uk/~canyon/patches/strcasecmp.patch-2.0.19
Submission from: (NULL) (

I believe that 4  uses of strcasecmp in servers/slapd/acl.c are in 
error and use the reverse logic to that intended. 

Namely, strcasecmp returns a 0 on a string match (case insensitive)
but the logic in parts of acl.c suggest that the original author
assumed a return value of 1 on string match. This is during
the acl <who> clause evaluation.

I've included a patch that reverses this logic to that
probably intended. I posted to openldap-devel to confirm
that it was a bug.