Module: check_mk
Branch: master
Commit: e964a0772ff6cccafcc9d99a08ba766b70a0326c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e964a0772ff6cc…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Nov 14 16:49:33 2013 +0100
Try to fix LDAP exception with nested groups
---
web/plugins/userdb/ldap.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index e7aa448..d419730 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -532,7 +532,7 @@ def ldap_group_members(filters, filt_attr = 'cn', nested =
False):
for dn, obj in
ldap_search(ldap_replace_macros(config.ldap_groupspec['dn']), filt, ['cn',
member_attr]):
groups[dn] = {
'cn' : obj['cn'][0],
- 'members' : [ m.encode('utf-8') for m in obj[member_attr]
],
+ 'members' : [ m.encode('utf-8') for m in
obj.get(member_attr,[]) ],
}
else:
# Nested querying is more complicated. We have no option to simply do a query for
group objects