Re: liblockfile: new version, new API
- To: firstname.lastname@example.org
- Subject: Re: liblockfile: new version, new API
- From: email@example.com (Miquel van Smoorenburg)
- Date: 11 Jun 1999 00:31:08 +0200
- Message-id: <7jpebc$7b7$1@Q.cistron.nl>
- In-reply-to: <19990610120631.B3005@molehole>
In article <cistron.19990610120631.B3005@molehole>,
Steve Greenland <firstname.lastname@example.org> wrote:
>On 10-Jun-99, 10:18 (CDT), Miquel van Smoorenburg <email@example.com> wrote:
>> On the bright side, programs can now use the functions in liblockfile
>> to lock mailboxes without any special priviliges.
>Tell me there is some sort of check w.r.t. mailbox ownership -- I can't
>write and run a program that locks an arbitrary mailbox, right?
To be able to create a lockfile with priviliges, 3 conditions must be met:
- The directory where the lockfile resides must be writable by group
mail (logical, since the ``dotlockfile'' utility runs setgid mail)
- The lockfile must be named "YOURUSERNAME.lock"
- The file "YOURUSERNAME" must exist and be owned by you
So no, you can't write and run a program that locks an arbitrary mailbox.
BTW, if you could, you wouldn't have to write a program for it - the
functions in liblockfile simply call the included utility ``dotlockfile''
to do the actual locking/unlocking.
Indifference will certainly be the downfall of mankind, but who cares?