summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/ldb_ldap/ldb_ldap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
index 5b682a493a..9ac51b26fe 100644
--- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c
+++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
@@ -252,7 +252,9 @@ static int lldb_search(struct ldb_context *ldb, const char *base,
LDAPMessage *ldapres, *msg;
lldb->last_rc = ldap_search_s(lldb->ldap, base, (int)scope,
- expression, attrs, 0, &ldapres);
+ expression,
+ discard_const_p(char *, attrs),
+ 0, &ldapres);
if (lldb->last_rc != LDAP_SUCCESS) {
return -1;
}