[LDB] Store index DNs as canonical case

Andrew Bartlett abartlet at samba.org
Mon Aug 31 07:27:31 MDT 2009

The attached patch reworks our index code to always store the canonical
casefolded form of the DN in an index.  It does not work yet, and needs
to add a 'index version' to the ldb to trigger a reindex.  The
casefolded index entries should be backward compatible, because the
previous code accepted any case variation, so we are simply being more
strict in what we now write.  

This was inspired by a bug where we would not delete index entries
because the DN was not in a canonical from, and the existing
strcasecmp() didn't match.  

(strcasecmp isn't the right option any more anyway)

This stems from the fact that LDB DNs were just case-insensitive strings
originally, but have become far more complex since then. 

Any comments would be most welcome while I chase down the remaining

Andrew Bartlett
Andrew Bartlett
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s4-ldb-Rework-ldb-index-code-to-use-the-casefolded-D.patch
Type: text/x-patch
Size: 37712 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20090831/c1635d78/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20090831/c1635d78/attachment.pgp>

More information about the samba-technical mailing list