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] 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)