From 41b136ff1b4c483930ef46c2f36e290923f375b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sun, 22 Dec 2019 12:14:29 +0100 Subject: [PATCH 1/3] Don't update LDAP if there are nothing to do --- moulinette/authenticators/ldap.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/moulinette/authenticators/ldap.py b/moulinette/authenticators/ldap.py index f3625efc..aac1b2ff 100644 --- a/moulinette/authenticators/ldap.py +++ b/moulinette/authenticators/ldap.py @@ -215,6 +215,9 @@ class Authenticator(BaseAuthenticator): actual_entry = self.search(base=dn, attrs=None) ldif = modlist.modifyModlist(actual_entry[0], attr_dict, ignore_oldexistent=1) + if ldif == []: + return True + try: if new_rdn: self.con.rename_s(dn, new_rdn) From 23acece79dc8cdeace266d2a4404bebbb5f810a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 23 Dec 2019 10:56:25 +0100 Subject: [PATCH 2/3] Add warning when nothing is updated in LDAP --- moulinette/authenticators/ldap.py | 1 + 1 file changed, 1 insertion(+) diff --git a/moulinette/authenticators/ldap.py b/moulinette/authenticators/ldap.py index aac1b2ff..15834678 100644 --- a/moulinette/authenticators/ldap.py +++ b/moulinette/authenticators/ldap.py @@ -216,6 +216,7 @@ class Authenticator(BaseAuthenticator): ldif = modlist.modifyModlist(actual_entry[0], attr_dict, ignore_oldexistent=1) if ldif == []: + logger.warning("Nothing to update in LDAP") return True try: From 9cc68f9d6228e8c949397228030ca91b9634a561 Mon Sep 17 00:00:00 2001 From: kay0u Date: Sun, 15 Mar 2020 16:13:21 +0000 Subject: [PATCH 3/3] Update changelog for 3.7.0.1 release --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 75ad5137..4659965e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +moulinette (3.7.0.1) testing; urgency=low + + - [fix] Slapd may crash if we try to update the LDAP with no change (moulinette#231) + + Thanks to all contributors (Josue) <3 ! + + -- Kay0u Sun, 15 Mar 2020 16:09:25 +0000 + moulinette (3.7.0) testing; urgency=low # ~ Major stuff