From: Philip Hazel Date: Tue, 25 Apr 2006 10:06:30 +0000 (+0000) Subject: Make lockfile_mode apply to MBX lock files. X-Git-Tag: exim-4_62~5 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7e9f683dbbd65f95ffbe6324af9951893e8d85ac;p=exim.git Make lockfile_mode apply to MBX lock files. --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 28044a279..60e901aac 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.345 2006/04/20 15:05:15 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.346 2006/04/25 10:06:30 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -36,6 +36,10 @@ PH/05 Batch deliveries by appendfile and pipe transports did not work when the PH/06 A failure to get a lock for a hints database would erroneously always say "Failed to get write lock", even when it was really a read lock. +PH/07 The appendfile transport was creating MBX lock files with a fixed mode + of 0600. This has been changed to use the value of the lockfile_mode + option (which defaults to 0600). + Exim version 4.61 ----------------- diff --git a/src/src/transports/appendfile.c b/src/src/transports/appendfile.c index 090951969..0e024f51b 100644 --- a/src/src/transports/appendfile.c +++ b/src/src/transports/appendfile.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/transports/appendfile.c,v 1.15 2006/04/20 14:11:29 ph10 Exp $ */ +/* $Cambridge: exim/src/src/transports/appendfile.c,v 1.16 2006/04/25 10:06:30 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -2019,7 +2019,7 @@ if (!isdirectory) } } - mbx_lockfd = Uopen(mbx_lockname, O_RDWR | O_CREAT, 0600); + mbx_lockfd = Uopen(mbx_lockname, O_RDWR | O_CREAT, ob->lockfile_mode); if (mbx_lockfd < 0) { addr->basic_errno = ERRNO_LOCKFAILED; @@ -2028,7 +2028,7 @@ if (!isdirectory) goto RETURN; } - (void)Uchmod(mbx_lockname, 0600); + (void)Uchmod(mbx_lockname, ob->lockfile_mode); if (apply_lock(mbx_lockfd, F_WRLCK, ob->use_fcntl, ob->lock_fcntl_timeout, ob->use_flock, ob->lock_flock_timeout) >= 0)