summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-15 02:54:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:49 -0500
commit9f676afe3ab19bb0502e6dca45fe0039a2ec285b (patch)
treeaac6e2e6d025560c06be87ef0564f8fe96cbcddb
parentb3b225c604e11e9c8d6f0939142d74f1e9c3c297 (diff)
downloadsamba-9f676afe3ab19bb0502e6dca45fe0039a2ec285b.tar.gz
samba-9f676afe3ab19bb0502e6dca45fe0039a2ec285b.tar.bz2
samba-9f676afe3ab19bb0502e6dca45fe0039a2ec285b.zip
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)
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_search.c8
1 files 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 536d1ac005..f813841edb 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);