procmail
[Top] [All Lists]

Re: 775 mail spool and "Bypassed locking"

1997-04-21 12:38:00
On Fri, 18 Apr 1997 18:43:34 -0500, Philip Guenther 
<guenther(_at_)gac(_dot_)edu> said:

After staring at it and running it under gdb to make sure, I'll agree
that with a [775] spool dir, procmail fails to use it group mail
privileges to create a lockfile, if, but only if, you have kernel
locking methods compiled in.

I looked at that code a half dozen times without noticing that, I was
reading right through the "#ifndef fdlock".  Thanks.

Procmail will instead use them, and thus mailboxes may still avoid
corruption that way.  However you got me why procmail doesn't take a
stab at setgid'ing and attempting the lock.  You'll have to ask
Stephen.

It sure looks like a bug to me.  procmail is doing a lot of work to get
everything set to go, but then it gives up for no reason at the last
moment.  Right at the top of procmail.c it says that it's happy to run
setgid mail with a non-world-writable mail spool, it doesn't make sense
to pretend this isn't the case just because the kernel supports locking.

I think for my purposes I'm just going to tell procmail not to use
kernel locking, I don't think it buys anything over sentinel file
locking for this application anyway.

-- 
Roderick Schertler
roderick(_at_)argon(_dot_)org