Author: idra
Date: 2005-07-26 09:17:46 +0000 (Tue, 26 Jul 2005)
New Revision: 8779

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

Log:

Add rdn module to makefile and headers
Search by distinguishedName as if searching by dn


Modified:
   branches/SAMBA_4_0/source/lib/ldb/Makefile.in
   branches/SAMBA_4_0/source/lib/ldb/include/ldb_private.h
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/Makefile.in
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/Makefile.in       2005-07-26 07:46:21 UTC 
(rev 8778)
+++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in       2005-07-26 09:17:46 UTC 
(rev 8779)
@@ -55,7 +55,7 @@
           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)
 

Modified: branches/SAMBA_4_0/source/lib/ldb/include/ldb_private.h
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/include/ldb_private.h     2005-07-26 
07:46:21 UTC (rev 8778)
+++ branches/SAMBA_4_0/source/lib/ldb/include/ldb_private.h     2005-07-26 
09:17:46 UTC (rev 8779)
@@ -171,7 +171,9 @@
                     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,
                  struct ldb_parse_tree *tree,

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-07-26 
07:46:21 UTC (rev 8778)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c      2005-07-26 
09:17:46 UTC (rev 8779)
@@ -464,7 +464,8 @@
        /* 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);
        }
 

Reply via email to