From: Clinton Ebadi Date: Thu, 14 May 2015 05:34:43 +0000 (-0400) Subject: skip failed chown check on file before writing X-Git-Tag: debian/4.84-8+hcoop4^0 X-Git-Url: https://git.hcoop.net/hcoop/debian/exim4.git/commitdiff_plain/ed7df6aed3350267779da0674e270711e5914e79 skip failed chown check on file before writing --- diff --git a/debian/changelog b/debian/changelog index 9a4747d..8a55785 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +exim4 (4.84-8+hcoop4) unstable; urgency=medium + + * Missed another chown that needs skipping + + -- Clinton Ebadi Thu, 14 May 2015 01:35:09 -0400 + exim4 (4.84-8+hcoop3) unstable; urgency=medium * Patch the right thing. diff --git a/debian/patches/50-relax-appendfile-chown-openafs.patch b/debian/patches/50-relax-appendfile-chown-openafs.patch index ba0b272..951a93d 100644 --- a/debian/patches/50-relax-appendfile-chown-openafs.patch +++ b/debian/patches/50-relax-appendfile-chown-openafs.patch @@ -32,3 +32,30 @@ } #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; + } + } +