summaryrefslogtreecommitdiff
path: root/source4/libcli/ldap/ldap_ildap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/ldap/ldap_ildap.c')
-rw-r--r--source4/libcli/ldap/ldap_ildap.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c
index a5227ec37f..f26fb7db78 100644
--- a/source4/libcli/ldap/ldap_ildap.c
+++ b/source4/libcli/ldap/ldap_ildap.c
@@ -152,13 +152,13 @@ int ildap_count_entries(struct ldap_connection *conn, struct ldap_message **res)
/*
- perform a ldap search
+ perform a synchronous ldap search
*/
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_Control **control_req,
- struct ldap_Control ***control_res,
+ struct ldb_control **control_req,
+ struct ldb_control ***control_res,
struct ldap_message ***results)
{
struct ldap_message *msg;
@@ -203,7 +203,9 @@ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn,
break;
}
- if (res->type != LDAP_TAG_SearchResultEntry) continue;
+ if (res->type != LDAP_TAG_SearchResultEntry &&
+ res->type != LDAP_TAG_SearchResultReference)
+ continue;
(*results) = talloc_realloc(conn, *results, struct ldap_message *, n+2);
if (*results == NULL) {
@@ -228,8 +230,8 @@ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn,
NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn,
int scope, const char *expression,
const char * const *attrs, BOOL attributesonly,
- struct ldap_Control **control_req,
- struct ldap_Control ***control_res,
+ struct ldb_control **control_req,
+ struct ldb_control ***control_res,
struct ldap_message ***results)
{
struct ldb_parse_tree *tree = ldb_parse_tree(conn, expression);