ud-mailgate: only run ldapmodfiy if we actually have attributes to modify.
authorPeter Palfrader <peter@palfrader.org>
Mon, 15 Aug 2011 19:52:42 +0000 (21:52 +0200)
committerPeter Palfrader <peter@palfrader.org>
Mon, 15 Aug 2011 19:52:42 +0000 (21:52 +0200)
debian/changelog
ud-mailgate

index 26b7e82..a433320 100644 (file)
@@ -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 <sgran@debian.org>  Thu, 09 Jun 2011 19:28:12 +0000
+ -- Peter Palfrader <weasel@debian.org>  Mon, 15 Aug 2011 21:52:22 +0200
 
 userdir-ldap (0.3.79) unstable; urgency=low
 
index 1ec0e9f..8d79959 100755 (executable)
@@ -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: