Re: [Exim] Reliability of spool/delivery handling (Linux)?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Dr Andrew C Aitchison
CC: Lutz Pressler, exim-users
Sujet: Re: [Exim] Reliability of spool/delivery handling (Linux)?
On Thu, 23 Aug 2001, Dr Andrew C Aitchison wrote:

> I followed the sample fix http://www.and.org/exim-3.31-dirfsync.patch
> well enough to make some guesses.
>
> While fsync flushes the file to disk and rename is atomic from the
> point of view of other processes, I summize that rename is *not* atomic
> below the filesystem level. There is a window during which the
> all process will be told that the rename has happened, but the
> disk thinks that the rename has not.


Yes, I think I've come to a similar conclusion.

The posted fix is, sigh, Linux-specific. It uses O_DIRECTORY. The man
page on RedHat Linux says this:

       O_DIRECTORY
              If pathname is not a directory, cause the  open  to
              fail.   This  flag is Linux-specific, and was added
              in kernel version 2.1.126, to avoid  denial-of-ser
              vice  problems if opendir(3) is called on a FIFO or
              tape device, but should not be used outside of  the
              implementation of opendir.


So in fact, the posted fix is illegal!


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.