From: Clinton Ebadi Date: Thu, 14 May 2015 04:34:01 +0000 (-0400) Subject: Actually patch maildir problem X-Git-Tag: debian/4.84-8+hcoop3^0 X-Git-Url: http://git.hcoop.net/hcoop/debian/exim4.git/commitdiff_plain/df703fd6e9f885a09fcaeb17a7a6331c89de0124 Actually patch maildir problem 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. --- diff --git a/debian/changelog b/debian/changelog index 32819a6..9a4747d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +exim4 (4.84-8+hcoop3) unstable; urgency=medium + + * Patch the right thing. + + -- Clinton Ebadi Thu, 14 May 2015 00:34:14 -0400 + exim4 (4.84-8+hcoop2) unstable; urgency=medium * Change message in chown failure for sanity check diff --git a/debian/patches/50-relax-appendfile-chown-openafs.patch b/debian/patches/50-relax-appendfile-chown-openafs.patch dissimilarity index 65% index b7b5ef2..ba0b272 100644 --- a/debian/patches/50-relax-appendfile-chown-openafs.patch +++ b/debian/patches/50-relax-appendfile-chown-openafs.patch @@ -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 */