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

tridge at samba.org tridge at samba.org
Wed May 25 09:05:24 GMT 2005


Author: tridge
Date: 2005-05-25 09:05:23 +0000 (Wed, 25 May 2005)
New Revision: 6967

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

Log:
fixed the new multi-value dn=@ATTRIBUTES so it actually works :-)

this demonstrates that we need a improved test suite as well

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-25 00:51:47 UTC (rev 6966)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_cache.c	2005-05-25 09:05:23 UTC (rev 6967)
@@ -261,7 +261,7 @@
 {
 	struct ltdb_private *ltdb = module->private_data;
 	const struct ldb_message_element *attr_el;
-	int i, ret=0;
+	int i, j, ret=0;
 
 	if (ltdb->cache->last_attribute.name &&
 	    ldb_attr_cmp(ltdb->cache->last_attribute.name, attr_name) == 0) {
@@ -276,7 +276,6 @@
 	attr_el = ldb_msg_find_element(ltdb->cache->attributes, attr_name);
 
 	if (!attr_el) {
-
 		/* check if theres a wildcard attribute */
 		attr_el = ldb_msg_find_element(ltdb->cache->attributes, "*");
 
@@ -286,8 +285,11 @@
 	}
 
 	for (i = 0; i < attr_el->num_values; i++) {
-		if (strcmp(ltdb_valid_attr_flags[i].name, attr_el->values[i].data) == 0) {
-			ret |= ltdb_valid_attr_flags[i].value;
+		for (j=0; ltdb_valid_attr_flags[j].name; j++) {
+			if (strcmp(ltdb_valid_attr_flags[j].name, 
+				   attr_el->values[i].data) == 0) {
+				ret |= ltdb_valid_attr_flags[j].value;
+			}
 		}
 	}
 



More information about the samba-cvs mailing list