adamwill / 389-ds-base

Forked from 389-ds-base 4 years ago
Clone

10ddfbc Ticket #547 - Incorrect assumption in ndn cache

1 file Authored by Noriko Hosoi 9 years ago, Committed by mreynolds 9 years ago,
    Ticket #547 - Incorrect assumption in ndn cache
    
    Bug Description: In ndn_cache_lookup, to determine the given dn
    is already normalized or not, the length is compared with the
    normalized dn length.  If they match, it considers the given dn
    is already normalized.  But there are cases even if the lengths
    are equal, the given dn may not be normalized yet.
    (e.g., 'cn="o=ABC",o=XYZ' vs. 'cn=o\3DABC,o=XYZ')
    
    Fix Description: This patch adds another check: if the dn and
    normalized dn length match, call memcmp to compare the 2 dn's.
    When memcmp returns 0, ndn_cache_lookup returns the passed dn.
    
    https://fedorahosted.org/389/ticket/547
    
    Reviewed by mreynolds (Thanks, Mark!).
    
    (cherry picked from commit 0c44a46448595fdb1e079b5f4c91d4d8bfa2e0f2)
    
    Conflicts:
    	ldap/servers/slapd/dn.c
    
        
file modified
+8 -5