svn commit: samba r6759 - in branches/SAMBA_4_0/source/lib/ldb/ldb_tdb: .

idra at samba.org idra at samba.org
Thu May 12 14:39:03 GMT 2005


Author: idra
Date: 2005-05-12 14:39:03 +0000 (Thu, 12 May 2005)
New Revision: 6759

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6759

Log:

let us have a wildcard attribute so that we can set a default for all attributes

example:

*: CASE_INSENSITIVE

by placing it in the @ATTRIBUTES object you make all the matching be case insensitive
to make an excepion to the general rule now you just need to create an entry like:

name: CASE_SENSITIVE

the key CASE_SENSITIVE currently does not exist but has the effect of making the code
ignore the wildcard default flag and being ldb case sensitive by default it let the
"name" attribute be case sensitive again


Tridge, can you look at this commit?
Should we introduce a CASE_SENSITVE/BINARY flag and handle it in the code ?

Simo.


Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_cache.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_cache.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_cache.c	2005-05-12 13:40:40 UTC (rev 6758)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_cache.c	2005-05-12 14:39:03 UTC (rev 6759)
@@ -272,7 +272,13 @@
 	attrs = ldb_msg_find_string(ltdb->cache->attributes, attr_name, NULL);
 
 	if (!attrs) {
-		return ret;
+
+		/* check if theres a wildcard attribute */
+		attrs = ldb_msg_find_string(ltdb->cache->attributes, "*", NULL);
+
+		if (!attrs) {
+			return ret;
+		}
 	}
 
 	/* we avoid using strtok and friends due to their nasty



More information about the samba-cvs mailing list