Bug#43529: debian-policy: mail locking in Debian is _not_ NFS safe
severity 43529 fixed
thanks
On Thu, 26 Aug 1999, Roland Rosenfeld wrote:
> Package: debian-policy
> Version: 3.0.1.1
> Severity: important
>
> Policy says the following about the locking of mail:
>
> All Debian MUAs and MTAs have to use the `maillock' and `mailunlock'
> functions provided by the `liblockfile' packages to lock and unlock
> mail boxes. These functions implement a NFS-safe locking mechanism.
> (It is ok if MUAs and MTAs don't link against liblockfile but use a
> _compatible_ mechanism. Please compare the mechanisms very carefully!)
>
> The problem with this is, that liblockfile is not NFS-safe when the
> client machine runs Linux 2.2.*.
I consider this bug fixed in 3.1.0.0, because this policy version
changed the above mail locking section (see #43651) to:
All Debian MUAs, MTAs, MDAs and other mailbox accessing programs (like
IMAP daemons) have to lock the mailbox in a NFS-safe way. This means
that `fcntl()' locking has to be combined with dot locking. To avoid
dead locks, a program has to use `fcntl()' first and dot locking after
this or alternatively implement the two locking methods in a non
blocking way[1]. Using the functions `maillock' and `mailunlock'
provided by the `liblockfile*'[2] packages is the recommended way to
realize this.
[1] If it is not possible to establish both locks, the system
shouldn't wait for the second lock to be established, but remove
the first lock, wait a (random) time, and start over locking
again.
[2] `liblockfile' version >>1.01
There's still the problem, that we don't have a liblockfile >>1.01
available yet, but this isn't a bug in the policy but in liblockfile,
which is reported as #43491.
Ciao
Roland
--
* roland@spinnaker.de * http://www.spinnaker.de/ *
Reply to: