diff --git a/source4/libcli/ldap/ldap.h b/source4/libcli/ldap/ldap.h index abb4617c485..3d99d6f47d1 100644 --- a/source4/libcli/ldap/ldap.h +++ b/source4/libcli/ldap/ldap.h @@ -106,7 +106,7 @@ struct ldap_SearchRequest { bool attributesonly; struct ldb_parse_tree *tree; int num_attributes; - const char **attributes; + const char * const *attributes; }; struct ldap_SearchResEntry { diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c index 8f21af06900..f059e3882ad 100644 --- a/source4/libcli/ldap/ldap_ildap.c +++ b/source4/libcli/ldap/ldap_ildap.c @@ -69,7 +69,7 @@ _PUBLIC_ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char * msg->r.SearchRequest.attributesonly = attributesonly; msg->r.SearchRequest.tree = tree; msg->r.SearchRequest.num_attributes = n; - msg->r.SearchRequest.attributes = discard_const(attrs); + msg->r.SearchRequest.attributes = attrs; msg->controls = control_req; req = ldap_request_send(conn, msg);