1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

r462: added an explanation about the rather complex ltdb_key() function

(This used to be commit 894e44022d)
This commit is contained in:
Andrew Tridgell
2004-05-04 05:58:22 +00:00
committed by Gerald (Jerry) Carter
parent 7ab448ae67
commit d6f20f8e92

View File

@ -54,6 +54,15 @@ struct TDB_DATA ltdb_key(struct ldb_context *ldb, const char *dn)
/*
most DNs are case insensitive. The exception is index DNs for
case sensitive attributes
there are 3 cases dealt with in this code:
1) if the dn doesn't start with @INDEX: then uppercase whole dn
2) if the dn starts with @INDEX:attr and 'attr' is a case insensitive
attribute then uppercase whole dn
3) if the dn starts with @INDEX:attr and 'attr' is a case sensitive
attribute then uppercase up to the value of the attribute, but
not the value itself
*/
if (strncmp(dn, prefix, strlen(prefix)) == 0 &&
(s = strchr(dn+strlen(prefix), ':'))) {