+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.
}
#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;
+ }
+ }
+