From 9f676afe3ab19bb0502e6dca45fe0039a2ec285b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 15 Jan 2005 02:54:53 +0000 Subject: [PATCH] r4744: 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. (This used to be commit 789325145651f2f6fc8716aa4bced83a2eb31994) --- source4/lib/ldb/ldb_tdb/ldb_search.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c index 536d1ac0052..f813841edb0 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_search.c +++ b/source4/lib/ldb/ldb_tdb/ldb_search.c @@ -150,12 +150,13 @@ static struct ldb_message *ltdb_pull_attrs(struct ldb_module *module, 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 @@ int ltdb_search(struct ldb_module *module, const char *base, } 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); -- 2.34.1