skip failed chown check on file before writing debian/4.84-8+hcoop4
authorClinton Ebadi <clinton@unknownlamer.org>
Thu, 14 May 2015 05:34:43 +0000 (01:34 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Thu, 14 May 2015 05:35:17 +0000 (01:35 -0400)
debian/changelog
debian/patches/50-relax-appendfile-chown-openafs.patch

index 9a4747d..8a55785 100644 (file)
@@ -1,3 +1,9 @@
+exim4 (4.84-8+hcoop4) unstable; urgency=medium
+
+  * Missed another chown that needs skipping
+
+ -- Clinton Ebadi <clinton@unknownlamer.org>  Thu, 14 May 2015 01:35:09 -0400
+
 exim4 (4.84-8+hcoop3) unstable; urgency=medium
 
   * Patch the right thing.
 exim4 (4.84-8+hcoop3) unstable; urgency=medium
 
   * Patch the right thing.
index ba0b272..951a93d 100644 (file)
      }
  
    #endif  /* SUPPORT_MAILDIR */
      }
  
    #endif  /* SUPPORT_MAILDIR */
+@@ -2739,12 +2750,21 @@
+   /* In all cases of writing to a new file, ensure that the file which is
+   going to be renamed has the correct ownership and mode. */
+-  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 file %s",
+-      filename);
+-    return FALSE;
++      addr->basic_errno = errno;
++      addr->message = string_sprintf("while setting owner on file before write %s",
++                                   filename);
++      return FALSE;
++    }
++  
++  if(Uchmod(filename, mode))
++    {
++      addr->basic_errno = errno;
++      addr->message = string_sprintf("while setting chmod on file before write %s",
++                                   filename);
++      return FALSE;
+     }
+   }