summaryrefslogtreecommitdiff
path: root/source4/libcli/ldap
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/ldap')
-rw-r--r--source4/libcli/ldap/ldap_ildap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c
index d85585bce8..666cc02536 100644
--- a/source4/libcli/ldap/ldap_ildap.c
+++ b/source4/libcli/ldap/ldap_ildap.c
@@ -180,7 +180,7 @@ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn,
msg->r.SearchRequest.attributesonly = attributesonly;
msg->r.SearchRequest.tree = tree;
msg->r.SearchRequest.num_attributes = n;
- msg->r.SearchRequest.attributes = attrs;
+ msg->r.SearchRequest.attributes = discard_const(attrs);
req = ldap_request_send(conn, msg);
talloc_steal(msg, req);
@@ -224,7 +224,8 @@ NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn,
{
struct ldb_parse_tree *tree = ldb_parse_tree(conn, expression);
NTSTATUS status;
- status = ildap_search(conn, basedn, scope, tree, attrs, attributesonly, results);
+ status = ildap_search_bytree(conn, basedn, scope, tree, attrs,
+ attributesonly, results);
talloc_free(tree);
return status;
}