2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

Avoid conflict with ldap_connect function of openldap

ldap_connect is defined by OpenLDAP 2.6. Compiler complains there are
conflicting declarations. Use dlz_ldap prefix instead of ldap to avoid
conflict.
This commit is contained in:
Petr Mensik
2021-12-22 13:36:39 +01:00
committed by Michał Kępień
parent 43d300ddaf
commit 49e523e56f

View File

@@ -193,7 +193,7 @@ cleanup:
/*% Connects / reconnects to LDAP server */ /*% Connects / reconnects to LDAP server */
static isc_result_t static isc_result_t
ldap_connect(ldap_instance_t *dbi, dbinstance_t *dbc) { dlz_ldap_connect(ldap_instance_t *dbi, dbinstance_t *dbc) {
isc_result_t result; isc_result_t result;
int ldap_result; int ldap_result;
@@ -700,7 +700,8 @@ ldap_get_results(const char *zone, const char *record, const char *client,
db->log(ISC_LOG_INFO, "LDAP driver attempting to " db->log(ISC_LOG_INFO, "LDAP driver attempting to "
"re-connect"); "re-connect");
result = ldap_connect((ldap_instance_t *)dbdata, dbi); result = dlz_ldap_connect((ldap_instance_t *)dbdata,
dbi);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
result = ISC_R_FAILURE; result = ISC_R_FAILURE;
continue; continue;
@@ -731,7 +732,8 @@ ldap_get_results(const char *zone, const char *record, const char *client,
case LDAP_SERVER_DOWN: case LDAP_SERVER_DOWN:
db->log(ISC_LOG_INFO, "LDAP driver attempting to " db->log(ISC_LOG_INFO, "LDAP driver attempting to "
"re-connect"); "re-connect");
result = ldap_connect((ldap_instance_t *)dbdata, dbi); result = dlz_ldap_connect((ldap_instance_t *)dbdata,
dbi);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
result = ISC_R_FAILURE; result = ISC_R_FAILURE;
} }
@@ -1117,7 +1119,7 @@ dlz_create(const char *dlzname, unsigned int argc, char *argv[], void **dbdata,
ldap->db = dbi; ldap->db = dbi;
#endif /* if PTHREADS */ #endif /* if PTHREADS */
/* attempt to connect */ /* attempt to connect */
result = ldap_connect(ldap, dbi); result = dlz_ldap_connect(ldap, dbi);
/* /*
* if db connection cannot be created, log err msg and * if db connection cannot be created, log err msg and