Module: check_mk
Branch: master
Commit: e12187e9a3af7cb0c3d36450713955322ce90400
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e12187e9a3af7c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Nov 27 16:27:32 2018 +0100
6914 FIX LDAP: Fixed wrong diagnose results when using fallback server option
The LDAP connection diagnose was showing wrong results for fallback servers
when a connetion to the server could not be established in the first step.
The diagnose was reusing the established connection to previous servers.
Change-Id: Iba9e127d29d51579c6c093cefc0eec0c8856cdc7
---
.werks/6914 | 14 ++++++++++++++
cmk/gui/plugins/userdb/ldap_connector.py | 2 ++
2 files changed, 16 insertions(+)
diff --git a/.werks/6914 b/.werks/6914
new file mode 100644
index 0000000..88ee6a0
--- /dev/null
+++ b/.werks/6914
@@ -0,0 +1,14 @@
+Title: LDAP: Fixed wrong diagnose results when using fallback server option
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1543237371
+
+The LDAP connection diagnose was showing wrong results for fallback servers
+when a connetion to the server could not be established in the first step.
+
+The diagnose was reusing the established connection to previous servers.
diff --git a/cmk/gui/plugins/userdb/ldap_connector.py
b/cmk/gui/plugins/userdb/ldap_connector.py
index 888b8bb..eac85c7 100644
--- a/cmk/gui/plugins/userdb/ldap_connector.py
+++ b/cmk/gui/plugins/userdb/ldap_connector.py
@@ -306,6 +306,7 @@ class LDAPUserConnector(UserConnector):
return # Use existing connections (if connection settings have not changed)
else:
self._logger.info('LDAP CONNECT - Connecting...')
+ self.disconnect()
# Some major config var validations
@@ -347,6 +348,7 @@ class LDAPUserConnector(UserConnector):
def disconnect(self):
self._ldap_obj = None
+ self._ldap_obj_config = None
def _discover_nearest_dc(self, domain):
cached_server = self._get_nearest_dc_from_cache()