|
|
ec7f7e |
From e6ed26c98ebac9313ce531a366f96ff9912e84af Mon Sep 17 00:00:00 2001
|
|
|
ec7f7e |
From: Petr Mensik <pemensik@redhat.com>
|
|
|
ec7f7e |
Date: Wed, 22 Dec 2021 13:36:39 +0100
|
|
|
ec7f7e |
Subject: [PATCH 1/2] Avoid conflict with ldap_connect function of openldap
|
|
|
ec7f7e |
|
|
|
ec7f7e |
ldap_connect is defined by OpenLDAP 2.6. Compiler complains there are
|
|
|
ec7f7e |
conflicting declarations. Use dlz_ldap prefix instead of ldap to avoid
|
|
|
ec7f7e |
conflict.
|
|
|
ec7f7e |
---
|
|
|
ec7f7e |
contrib/dlz/modules/ldap/dlz_ldap_dynamic.c | 8 ++++----
|
|
|
ec7f7e |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
ec7f7e |
|
|
|
ec7f7e |
diff --git a/contrib/dlz/modules/ldap/dlz_ldap_dynamic.c b/contrib/dlz/modules/ldap/dlz_ldap_dynamic.c
|
|
|
ec7f7e |
index 543a95d..317a691 100644
|
|
|
ec7f7e |
--- a/contrib/dlz/modules/ldap/dlz_ldap_dynamic.c
|
|
|
ec7f7e |
+++ b/contrib/dlz/modules/ldap/dlz_ldap_dynamic.c
|
|
|
ec7f7e |
@@ -193,7 +193,7 @@ cleanup:
|
|
|
ec7f7e |
|
|
|
ec7f7e |
/*% Connects / reconnects to LDAP server */
|
|
|
ec7f7e |
static isc_result_t
|
|
|
ec7f7e |
-ldap_connect(ldap_instance_t *dbi, dbinstance_t *dbc) {
|
|
|
ec7f7e |
+dlz_ldap_connect(ldap_instance_t *dbi, dbinstance_t *dbc) {
|
|
|
ec7f7e |
isc_result_t result;
|
|
|
ec7f7e |
int ldap_result;
|
|
|
ec7f7e |
|
|
|
ec7f7e |
@@ -700,7 +700,7 @@ ldap_get_results(const char *zone, const char *record, const char *client,
|
|
|
ec7f7e |
db->log(ISC_LOG_INFO, "LDAP driver attempting to "
|
|
|
ec7f7e |
"re-connect");
|
|
|
ec7f7e |
|
|
|
ec7f7e |
- result = ldap_connect((ldap_instance_t *)dbdata, dbi);
|
|
|
ec7f7e |
+ result = dlz_ldap_connect((ldap_instance_t *)dbdata, dbi);
|
|
|
ec7f7e |
if (result != ISC_R_SUCCESS) {
|
|
|
ec7f7e |
result = ISC_R_FAILURE;
|
|
|
ec7f7e |
continue;
|
|
|
ec7f7e |
@@ -731,7 +731,7 @@ ldap_get_results(const char *zone, const char *record, const char *client,
|
|
|
ec7f7e |
case LDAP_SERVER_DOWN:
|
|
|
ec7f7e |
db->log(ISC_LOG_INFO, "LDAP driver attempting to "
|
|
|
ec7f7e |
"re-connect");
|
|
|
ec7f7e |
- result = ldap_connect((ldap_instance_t *)dbdata, dbi);
|
|
|
ec7f7e |
+ result = dlz_ldap_connect((ldap_instance_t *)dbdata, dbi);
|
|
|
ec7f7e |
if (result != ISC_R_SUCCESS) {
|
|
|
ec7f7e |
result = ISC_R_FAILURE;
|
|
|
ec7f7e |
}
|
|
|
ec7f7e |
@@ -1117,7 +1117,7 @@ dlz_create(const char *dlzname, unsigned int argc, char *argv[], void **dbdata,
|
|
|
ec7f7e |
ldap->db = dbi;
|
|
|
ec7f7e |
#endif /* if PTHREADS */
|
|
|
ec7f7e |
/* attempt to connect */
|
|
|
ec7f7e |
- result = ldap_connect(ldap, dbi);
|
|
|
ec7f7e |
+ result = dlz_ldap_connect(ldap, dbi);
|
|
|
ec7f7e |
|
|
|
ec7f7e |
/*
|
|
|
ec7f7e |
* if db connection cannot be created, log err msg and
|
|
|
ec7f7e |
--
|
|
|
ec7f7e |
2.31.1
|
|
|
ec7f7e |
|