Author: tridge
Date: 2005-09-30 23:56:54 +0000 (Fri, 30 Sep 2005)
New Revision: 10668

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

Log:

added a ildap_search_bytree() function


Modified:
   branches/SAMBA_4_0/source/libcli/ldap/ldap_ildap.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/ldap/ldap_ildap.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/ldap/ldap_ildap.c  2005-09-30 23:47:40 UTC 
(rev 10667)
+++ branches/SAMBA_4_0/source/libcli/ldap/ldap_ildap.c  2005-09-30 23:56:54 UTC 
(rev 10668)
@@ -154,10 +154,10 @@
 /*
   perform a ldap search
 */
-NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn, 
-                     int scope, const char *expression, 
-                     const char * const *attrs, BOOL attributesonly, 
-                     struct ldap_message ***results)
+NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn, 
+                            int scope, struct ldb_parse_tree *tree,
+                            const char * const *attrs, BOOL attributesonly, 
+                            struct ldap_message ***results)
 {
        struct ldap_message *msg;
        int n, i;
@@ -178,7 +178,7 @@
        msg->r.SearchRequest.timelimit = 0;
        msg->r.SearchRequest.sizelimit = 0;
        msg->r.SearchRequest.attributesonly = attributesonly;
-       msg->r.SearchRequest.tree = ldb_parse_tree(msg, expression);
+       msg->r.SearchRequest.tree = tree;
        msg->r.SearchRequest.num_attributes = n;
        msg->r.SearchRequest.attributes = attrs;
 
@@ -213,3 +213,18 @@
 
        return status;
 }
+
+/*
+  perform a ldap search
+*/
+NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn, 
+                     int scope, const char *expression, 
+                     const char * const *attrs, BOOL attributesonly, 
+                     struct ldap_message ***results)
+{
+       struct ldb_parse_tree *tree = ldb_parse_tree(conn, expression);
+       NTSTATUS status;
+       status = ildap_search(conn, basedn, scope, tree, attrs, attributesonly, 
results);
+       talloc_free(tree);
+       return status;
+}

Reply via email to