diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-09-30 23:56:54 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:39:16 -0500 |
commit | 67762d7965d74e4534a9dcb06276786fa9a37713 (patch) | |
tree | e71a2bcb861ffb39c43be382ba38b18f777b4a33 | |
parent | 5ed07022b04bdbb42b7404146c7978b5de0745c0 (diff) | |
download | samba-67762d7965d74e4534a9dcb06276786fa9a37713.tar.gz samba-67762d7965d74e4534a9dcb06276786fa9a37713.tar.bz2 samba-67762d7965d74e4534a9dcb06276786fa9a37713.zip |
r10668: added a ildap_search_bytree() function
(This used to be commit fd6d895ebdb201ac6afaf5c8ec84d003765cdff6)
-rw-r--r-- | source4/libcli/ldap/ldap_ildap.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c index 541797c25c..d85585bce8 100644 --- a/source4/libcli/ldap/ldap_ildap.c +++ b/source4/libcli/ldap/ldap_ildap.c @@ -154,10 +154,10 @@ int ildap_count_entries(struct ldap_connection *conn, struct ldap_message **res) /* 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 @@ NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn, 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 @@ NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn, 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; +} |