Actually patch maildir problem debian/4.84-8+hcoop3
authorClinton Ebadi <clinton@unknownlamer.org>
Thu, 14 May 2015 04:34:01 +0000 (00:34 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Thu, 14 May 2015 04:34:24 +0000 (00:34 -0400)
It would help if I patched the maildir in afs issue and not the
mailbox problem... reverting the mailbox case even if it might make
sense, review later.

debian/changelog
debian/patches/50-relax-appendfile-chown-openafs.patch

index 32819a6..9a4747d 100644 (file)
@@ -1,3 +1,9 @@
+exim4 (4.84-8+hcoop3) unstable; urgency=medium
+
+  * Patch the right thing.
+
+ -- Clinton Ebadi <clinton@unknownlamer.org>  Thu, 14 May 2015 00:34:14 -0400
+
 exim4 (4.84-8+hcoop2) unstable; urgency=medium
 
   * Change message in chown failure for sanity check
dissimilarity index 65%
index b7b5ef2..ba0b272 100644 (file)
@@ -1,35 +1,34 @@
---- a/src/transports/appendfile.c
-+++ b/src/transports/appendfile.c
-@@ -1769,19 +1769,28 @@
-         goto RETURN;
-         }
--      /* We have successfully created and opened the file. Ensure that the group
-+      /* We have successfully created and opened the file. Ensure that the owner
-       and the mode are correct. */
--      if(Uchown(filename, uid, gid) || Uchmod(filename, mode))
-+      /* Ignore failed chown if check_owner is disabled. */
-+      if(Uchown(filename, uid, gid) && ob->check_owner)
-         {
-         addr->basic_errno = errno;
--        addr->message = string_sprintf("while setting perms on mailbox %s",
-+        addr->message = string_sprintf("while setting owner on mailbox %s",
-           filename);
-         addr->transport_return = FAIL;
-         goto RETURN;
-         }
--      }
-+      if(Uchmod(filename, mode))
-+      {
-+        addr->basic_errno = errno;
-+        addr->message = string_sprintf("while setting chmod on mailbox %s",
-+          filename);
-+        addr->transport_return = FAIL;
-+        goto RETURN;
-+      }
-+      }
-     /* The file already exists. Test its type, ownership, and permissions, and
-     save the inode for checking later. If symlinks are permitted (not the
+--- a/src/transports/appendfile.c
++++ b/src/transports/appendfile.c
+@@ -2580,13 +2580,24 @@
+     /* Why are these here? Put in because they are present in the non-maildir
+     directory case above. */
+-    if(Uchown(filename, uid, gid) || Uchmod(filename, mode))
+-      {
+-      addr->basic_errno = errno;
+-      addr->message = string_sprintf("while setting perms on maildir %s",
+-        filename);
+-      return FALSE;
+-      }
++    /* Ignore failed chown if check_owner is disabled. */
++      if(Uchown(filename, uid, gid) && ob->check_owner)
++        {
++        addr->basic_errno = errno;
++        addr->message = string_sprintf("while setting owner on maildir %s",
++          filename);
++        addr->transport_return = FAIL;
++        goto RETURN;
++        }
++
++      if(Uchmod(filename, mode))
++      {
++        addr->basic_errno = errno;
++        addr->message = string_sprintf("while setting chmod on maildir %s",
++          filename);
++        addr->transport_return = FAIL;
++        goto RETURN;
++      }
+     }
+   #endif  /* SUPPORT_MAILDIR */