[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Added ~/.<program>rc as a config file.

From: Sergey Poznyakoff
Subject: Re: Added ~/.<program>rc as a config file.
Date: Mon, 25 Mar 2002 12:19:04 +0200


> Is there a way for imap4d to gain uid root back again, so it can
> lock anything, anywhere?

No, there is not. It uses setuid which makes re-gaining root
privileges impossible. It could be changed, but I wouldn't like
changing it, due to the security reasons.

> What I don't like about the "lock in another directory", is that
> it doesn't seem interoperable, wouldn't somebody with permissions
> locking the file with some other tool create a "real" lockfile? It
> seems fragile.

What's more: a conflict arises while locking two different mailboxes
having the same names but residing in different directories. There
are other problems too. On reconsidering, I do not regard this method
as a reliable one, either.

> What do you think?

I would propose the following way of applying a write lock:

1.   If the mailbox about to be locked is writable for the current user, then:
1.1    If the directory it resides in is also writable then
1.2      lock it as usual.
1.3    otherwise
1.4      fall back to lockf (or fcntl) file locking.
2    otherwise
2.1    do not lock it at all.   



reply via email to

[Prev in Thread] Current Thread [Next in Thread]