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

tridge at samba.org tridge at samba.org
Sat Jan 15 02:54:54 GMT 2005


Author: tridge
Date: 2005-01-15 02:54:53 +0000 (Sat, 15 Jan 2005)
New Revision: 4744

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

Log:
until we decide what to do about attribute aliasing (see my recent
samba-technical posting), this is an interim solution that makes us
work pretty much like w2k3 does.

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


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c	2005-01-15 02:28:26 UTC (rev 4743)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c	2005-01-15 02:54:53 UTC (rev 4744)
@@ -150,12 +150,13 @@
 			continue;
 		}
 
-		if (ldb_attr_cmp(attrs[i], "dn") == 0) {
+		if (ldb_attr_cmp(attrs[i], "dn") == 0 ||
+		    ldb_attr_cmp(attrs[i], "distinguishedName") == 0) {
 			struct ldb_message_element el2;
 			struct ldb_val val;
 
 			el2.flags = 0;
-			el2.name = talloc_strdup(ret, "dn");
+			el2.name = talloc_strdup(ret, attrs[i]);
 			if (!el2.name) {
 				talloc_free(ret);
 				return NULL;				
@@ -501,7 +502,8 @@
 	}
 
 	if (tree->operation == LDB_OP_SIMPLE && 
-	    ldb_attr_cmp(tree->u.simple.attr, "dn") == 0 &&
+	    (ldb_attr_cmp(tree->u.simple.attr, "dn") == 0 ||
+	     ldb_attr_cmp(tree->u.simple.attr, "distinguishedName") == 0) &&
 	    !ltdb_has_wildcard(module, tree->u.simple.attr, &tree->u.simple.value)) {
 		/* yay! its a nice simple one */
 		ret = ltdb_search_dn(module, tree->u.simple.value.data, attrs, res);



More information about the samba-cvs mailing list