Module: check_mk
Branch: master
Commit: 4f2e56a491778451855085f133566f8d185e64be
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4f2e56a4917784…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Mar 27 10:25:17 2013 +0100
LDAP connector: new option 'no_persistent'
---
ChangeLog | 2 ++
web/plugins/userdb/ldap.py | 2 +-
web/plugins/wato/check_mk_configuration.py | 8 +++++++-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ae8cf67..953d7f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,8 @@
* Added PNP tempate for check_disk_smb
* Dashboards can now be configured to be reloaded on resizing
(automatically adds width/height url parameters)
+ * LDAP authentification: New config option "Do not use persistent
+ connections to ldap server"
Event Console:
* New rule feature: automatically delete event after actions
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 187c176..db0b7bf 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -102,7 +102,7 @@ def ldap_uri():
def ldap_connect():
global ldap_connection, ldap_connection_options
- if ldap_connection and config.ldap_connection == ldap_connection_options:
+ if not "no_persistent" in config.ldap_connection and ldap_connection and
config.ldap_connection == ldap_connection_options:
return # Use existing connections (if connection settings have not changed)
try:
diff --git a/web/plugins/wato/check_mk_configuration.py
b/web/plugins/wato/check_mk_configuration.py
index f3e5e54..8ce9ab0 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -376,6 +376,12 @@ register_configvar(group,
value = True,
totext = _("Encrypt the network connection using SSL."),
)),
+ ("no_persistent", FixedValue(
+ title = _("No persistent connection"),
+ help = _("The connection to the LDAP server is not
persisted."),
+ value = True,
+ totext = _("Don't use persistent LDAP connections."),
+ )),
("connect_timeout", Float(
title = _("LDAP Connect Timeout (sec)"),
help = _("Timeout for the initial connection to the LDAP server in
seconds."),
@@ -423,7 +429,7 @@ register_configvar(group,
],
)),
],
- optional_keys = ['use_ssl', 'bind', ],
+ optional_keys = ['no_persistent', 'use_ssl', 'bind', ],
),
domain = "multisite",
)