summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/ldb_tdb')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_search.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c
index 8e84cfa681..922d24b6eb 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_search.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_search.c
@@ -464,7 +464,8 @@ int ltdb_search_bytree(struct ldb_module *module, const char *base,
/* it is important that we handle dn queries this way, and not
via a full db search, otherwise ldb is horribly slow */
if (tree->operation == LDB_OP_EQUALITY &&
- ldb_attr_cmp(tree->u.equality.attr, "dn") == 0) {
+ (ldb_attr_cmp(tree->u.equality.attr, "dn") == 0 ||
+ ldb_attr_cmp(tree->u.equality.attr, "distinguishedName") == 0)) {
return ltdb_search_dn(module, tree->u.equality.value.data, attrs, res);
}