Module: check_mk
Branch: master
Commit: 31137e1e66b051eb7a03e4e28e26468df72630b2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=31137e1e66b051…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Aug 29 08:43:55 2017 +0200
LDAP: Fixed broken sync of nested groups
Change-Id: I22b92347506e141338c33c4beffb5e55fecf0c8e
---
web/plugins/userdb/ldap.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 200371f..35ff1ad 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -883,12 +883,12 @@ class LDAPUserConnector(UserConnector):
if not result:
continue # Skip groups which can not be found
- for dn, cn in result:
- matched_groups[dn] = cn
+ for dn, attrs in result:
+ matched_groups[dn] = attrs["cn"][0]
else:
# in case of asking with DNs in nested mode, the resulting objects have
the
# cn set to None for all objects. We do not need it in that case.
- matched_groups[dn] = None
+ matched_groups[filter_val] = None
for dn, cn in matched_groups.items():
filt = '(&%s(memberOf:1.2.840.113556.1.4.1941:=%s))' % \