Module: check_mk
Branch: master
Commit: e7a2987e1f430fd1ca9dd387b64f373b1e568db4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e7a2987e1f430f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jul 8 15:43:46 2015 +0200
The Check_MK LDAP integration can now deal with LDAP directories which use special characters
like german umlauts e.g. in OU (Organisational Unit) names in the LDAP directory. Previous
version simply did not allow to configure such DNs (Distinguished Names) as user or group DNs.
Conflicts:
ChangeLog
web/plugins/userdb/ldap.py
---
.werks/2396 | 12 ++++++++++++
ChangeLog | 1 +
web/htdocs/valuespec.py | 2 +-
web/htdocs/wato.py | 2 +-
web/plugins/userdb/ldap.py | 13 +++++++++++--
5 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/.werks/2396 b/.werks/2396
new file mode 100644
index 0000000..3e14d8c
--- /dev/null
+++ b/.werks/2396
@@ -0,0 +1,12 @@
+Title: LDAP: Fixed handling of LDAP trees having special chars in the path (e.g. in OU names)
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1436362239
+
+The Check_MK LDAP integration can now deal with LDAP directories which use special characters
+like german umlauts e.g. in OU (Organisational Unit) names in the LDAP directory. Previous
+version simply did not allow to configure such DNs (Distinguished Names) as user or group DNs.
diff --git a/ChangeLog b/ChangeLog
index 6a248a5..62aa62e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -55,6 +55,7 @@
* 2380 FIX: Custom Host Notes painter was showing service notes when used in service based views
* 2393 FIX: Fixed exception "user_confdir" not set in case of exceptions during login
* 1263 FIX: Fixed handling of urls in views...
+ * 2396 FIX: LDAP: Fixed handling of LDAP trees having special chars in the path (e.g. in OU names)...
WATO:
* 2365 Removed old deprecated notification global options for plain emails...
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 1373c81..ef6e5fe 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -3148,7 +3148,7 @@ class Transform(ValueSpec):
self._valuespec.validate_value(self.forth(value), varprefix)
ValueSpec.custom_validate(self, value, varprefix)
-class LDAPDistinguishedName(TextAscii):
+class LDAPDistinguishedName(TextUnicode):
def __init__(self, **kwargs):
TextAscii.__init__(self, **kwargs)
self.enforce_suffix = kwargs.get('enforce_suffix')
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 4cd28c7..0d1aff2 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7722,7 +7722,7 @@ def mode_edit_ldap_connection(phase):
msg = _('Found no user object for synchronization. Please check your filter settings.')
except Exception, e:
ldap_users = None
- msg = str(e)
+ msg = "%s" % e
if 'successful bind must be completed' in msg:
if not connection.has_bind_credentials_configured():
return (False, _('Please configure proper bind credentials.'))
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 97e3249..bd6318d 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -115,9 +115,11 @@ ldap_umlaut_translation = {
ord(u'æ'): u'ae',
}
+
class MKLDAPException(MKGeneralException):
pass
+
def ldap_test_module():
try:
ldap
@@ -125,6 +127,13 @@ def ldap_test_module():
raise MKLDAPException(_("The python module python-ldap seems to be missing. You need to "
"install this extension to make the LDAP user connector work."))
+
+def make_utf8(x):
+ if type(x) == unicode:
+ return x.encode('utf-8')
+ else:
+ return x
+
#.
# .--UserConnector-------------------------------------------------------.
# | _ _ ____ _ |
@@ -430,7 +439,7 @@ class LDAPUserConnector(UserConnector):
try:
search_func = self._config.get('page_size') \
and self.ldap_paged_async_search or self.ldap_async_search
- for dn, obj in search_func(base, self.ldap_get_scope(scope), filt, columns):
+ for dn, obj in search_func(make_utf8(base), self.ldap_get_scope(scope), make_utf8(filt), columns):
if dn is None:
continue # skip unwanted answers
new_obj = {}
@@ -454,7 +463,7 @@ class LDAPUserConnector(UserConnector):
last_exc = e
if tries_left:
self.log(' Received %r. Retrying with clean connection...' % e)
- ldap_disconnect()
+ self.disconnect()
time.sleep(0.5)
else:
self.log(' Giving up.')
Module: check_mk
Branch: master
Commit: 8deb50c3f9e60dc8fac89b77a69b2af4d75d27b0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8deb50c3f9e60d…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Jul 8 14:09:21 2015 +0200
#1266 FIX cisco_mem_asa: Special memory check for cisco asa devices.
The normal cisco_memory check now ignores Cisco Adaptive Security Appliances because of a bug in the firmware:
http://www.cisco.com/c/en/us/support/docs/security/asa-5500-x-series-next-g…
Instead, this check will appear. The name wont change and you don't loose any history, but a re discovery is needed.
This check only ignores the MEMPOOL_GLOBAL_SHARED pool.
---
.werks/1266 | 12 +++++++++
ChangeLog | 2 ++
checkman/cisco_mem_asa | 12 +++++++++
checks/cisco_mem | 44 +++-----------------------------
checks/cisco_mem.include | 63 ++++++++++++++++++++++++++++++++++++++++++++++
checks/cisco_mem_asa | 45 +++++++++++++++++++++++++++++++++
6 files changed, 137 insertions(+), 41 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=8deb50c3f9…
Module: check_mk
Branch: master
Commit: 53ce459ba62d01c7b281df5dd5284817c757b34d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=53ce459ba62d01…
Author: Sven Rueß <sr(a)mathias-kettner.de>
Date: Wed Jul 8 11:35:57 2015 +0200
Added a ToDo for redundant network routes
---
.bugs/2352 | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/.bugs/2352 b/.bugs/2352
new file mode 100644
index 0000000..3d1926f
--- /dev/null
+++ b/.bugs/2352
@@ -0,0 +1,10 @@
+Title: Better support for redundant network routes
+Component: wato
+State: open
+Date: 2015-07-08 11:24:29
+Targetversion: future
+Class: todo
+
+Customer Polizei Niedersachen requests a better support for redundant network routes in our product.
+It shouldb be possible to configure the parents relationship and the fallback route. Errors and notifications
+have to take care about the relation of the redundant network routes.
\ No newline at end of file