summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/ldb/Makefile.in2
-rw-r--r--source4/lib/ldb/include/ldb_private.h2
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_search.c3
3 files changed, 5 insertions, 2 deletions
diff --git a/source4/lib/ldb/Makefile.in b/source4/lib/ldb/Makefile.in
index 81e2b147d5..bbd2602ef7 100644
--- a/source4/lib/ldb/Makefile.in
+++ b/source4/lib/ldb/Makefile.in
@@ -55,7 +55,7 @@ COMMON_OBJ=common/ldb.o common/ldb_ldif.o \
common/ldb_dn.o common/ldb_match.o common/ldb_attributes.o \
common/attrib_handlers.o
-MODULES_OBJ=modules/timestamps.o modules/schema.o
+MODULES_OBJ=modules/timestamps.o modules/schema.o modules/rdn_name.o
OBJS = $(MODULES_OBJ) $(COMMON_OBJ) $(LDB_TDB_OBJ) $(TDB_OBJ) $(TALLOC_OBJ) $(LDB_LDAP_OBJ) $(LDB_SQLITE3_OBJ)
diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h
index 0abf056db4..43e6a3ecba 100644
--- a/source4/lib/ldb/include/ldb_private.h
+++ b/source4/lib/ldb/include/ldb_private.h
@@ -171,6 +171,8 @@ int lsqlite3_connect(struct ldb_context *ldb,
const char *options[]);
struct ldb_module *timestamps_module_init(struct ldb_context *ldb, const char *options[]);
struct ldb_module *schema_module_init(struct ldb_context *ldb, const char *options[]);
+struct ldb_module *rdn_name_module_init(struct ldb_context *ldb, const char *options[]);
+
int ldb_match_msg(struct ldb_context *ldb,
struct ldb_message *msg,
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);
}