summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-05-04 05:58:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:44 -0500
commitd6f20f8e92bbbf7b8ac5ace83aae15bad8ef8bba (patch)
tree5b501f988a463cac4fcf5c413c0a718dfe076f09 /source4/lib
parent7ab448ae67a0ea52817ef5b8379644a20153b5a9 (diff)
downloadsamba-d6f20f8e92bbbf7b8ac5ace83aae15bad8ef8bba.tar.gz
samba-d6f20f8e92bbbf7b8ac5ace83aae15bad8ef8bba.tar.bz2
samba-d6f20f8e92bbbf7b8ac5ace83aae15bad8ef8bba.zip
r462: added an explanation about the rather complex ltdb_key() function
(This used to be commit 894e44022d16d9ff43f421fb15495845710000ab)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index 92b88e4fb5..c674f0c27e 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -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), ':'))) {