Module: check_mk
Branch: master
Commit: a501b97dfaffbede700b82ba663bba0eabcf9740
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a501b97dfaffbe…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jun 18 16:40:38 2013 +0200
FIX: LDAP: Disabling use of referrals in active directory configuration
Conflicts:
ChangeLog
---
ChangeLog | 2 ++
web/plugins/userdb/ldap.py | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 72512ce..e5498b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -188,6 +188,8 @@
Checks & Agents:
* FIX: winperf_processor: fix case where CPU percent is exactly 100%
+ Multisite:
+ * FIX: LDAP: Disabling use of referrals in active directory configuration
1.2.2p2:
Core:
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index eeb94f2..ae51e41 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -130,6 +130,11 @@ def ldap_connect():
ldap_connection.protocol_version = config.ldap_connection['version']
ldap_connection.network_timeout =
config.ldap_connection.get('connect_timeout', 2.0)
+ # When using the domain top level as base-dn, the subtree search stumbles with
referral objects.
+ # whatever. We simply disable them here when using active directory. Hope this
fixes all problems.
+ if config.ldap_connection['type'] == 'ad':
+ ldap_connection.set_option(ldap.OPT_REFERRALS, 0)
+
ldap_default_bind()
# on success, store the connection options the connection has been made with