From: Peter Palfrader Date: Mon, 15 Aug 2011 19:52:42 +0000 (+0200) Subject: ud-mailgate: only run ldapmodfiy if we actually have attributes to modify. X-Git-Tag: userdir-ldap-0.3.85~94 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=f2d431dee2f52f071afa1fd00d4e4589b1f5899e ud-mailgate: only run ldapmodfiy if we actually have attributes to modify. --- diff --git a/debian/changelog b/debian/changelog index 26b7e82..a433320 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,12 +6,13 @@ userdir-ldap (0.3.XXX) UNRELEASED; urgency=low with random multipart mails. * naming your variable like a module is unsmart. * ud-generate: filter on shadowAccount. + * ud-mailgate: only run ldapmodfiy if we actually have attributes to modify. [ Stephen Gran ] * Fix deprecation warnings for sha module by using hashlib module instead * ud-fingerserv: update Net::LDAP import - -- Stephen Gran Thu, 09 Jun 2011 19:28:12 +0000 + -- Peter Palfrader Mon, 15 Aug 2011 21:52:22 +0200 userdir-ldap (0.3.79) unstable; urgency=low diff --git a/ud-mailgate b/ud-mailgate index 1ec0e9f..8d79959 100755 --- a/ud-mailgate +++ b/ud-mailgate @@ -615,7 +615,7 @@ def HandleChange(Reply,DnRecord,Key): # Connect to the ldap server l = connect_to_ldap_and_check_if_locked(DnRecord) - if CommitChanges == 1: # only if we are still good to go + if CommitChanges == 1 and len(Attrs) > 0: # only if we are still good to go try: Res = FinishConfirmSudopassword(l, GetAttr(DnRecord,"uid"), Attrs) if not Res is None: