Module: check_mk
Branch: master
Commit: c6e0110652125e79aca6e66d715c1d5882545bd6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c6e0110652125e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jul 24 14:30:51 2013 +0200
ldap: Always using lower case ldap attributes
---
web/plugins/userdb/ldap.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 85c4069..60f6aae 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -311,8 +311,9 @@ def ldap_filter(key, handle_config = True):
# Returns the ldap attribute name depending on the configured ldap directory type
# If a key is not present in the map, the assumption is, that the key matches 1:1
+# Always use lower case here, just to prevent confusions.
def ldap_attr(key):
- return ldap_attr_map[config.ldap_connection['type']].get(key, key)
+ return ldap_attr_map[config.ldap_connection['type']].get(key, key).lower()
# Returns the given distinguished name template with replaced vars
def ldap_replace_macros(tmpl):
@@ -718,6 +719,8 @@ def ldap_sync(add_to_changelog, only_username):
ldap_connect()
+ ldap_log(' SYNC PLUGINS: %s' % ',
'.join(config.ldap_active_plugins.keys()))
+
# Unused at the moment, always sync all users
#filt = None
#if only_username: