Module: check_mk
Branch: master
Commit: 74a4e4054417515647988961629e6f06c10d9b6d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=74a4e405441751…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Nov 5 15:00:19 2013 +0100
FIX LDAP: Fixed error with empty groups during non nested group sync
Latest release introduced a problem when syncing with empty groups
---
.werks/44 | 8 ++++++++
ChangeLog | 1 +
web/plugins/userdb/ldap.py | 2 +-
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/.werks/44 b/.werks/44
new file mode 100644
index 0000000..9e0e19c
--- /dev/null
+++ b/.werks/44
@@ -0,0 +1,8 @@
+Title: LDAP: Fixed error with empty groups during non nested group sync
+Level: 1
+Component: multisite
+Version: 1.2.3i7
+Date: 1383659982
+Class: fix
+
+Latest release introduced a problem when syncing with empty groups
diff --git a/ChangeLog b/ChangeLog
index 5f0da13..1ca11d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
* 0001 : New filters for selecting several host/service-groups at once...
* 0050 : New concept of favorite hosts and services plus matching filters and
views...
* 0043 FIX : LDAP: Improved error reporting during synchronisation...
+ * 0044 FIX : LDAP: Fixed error with empty groups during non nested group sync...
Livestatus:
* 0023 FIX : table statehist: code cleanup / minor performance improvements...
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 645878c..488a717 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' : obj[member_attr]
+ 'members' : obj.get(member_attr, []),
}
else:
# Nested querying is more complicated. We have no option to simply do a query for
group objects