nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] dot locking broken?


From: Marcin Cieslak
Subject: Re: [Nmh-workers] dot locking broken?
Date: Fri, 13 Feb 2015 21:01:05 +0000 (UTC)
User-agent: slrn/0.9.9p1 (FreeBSD)

>> David Levine <address@hidden> wrote:
> Marcin wrote:
>
>> Here's what I'd do:
>>
>> diff --git a/sbr/lock_file.c b/sbr/lock_file.c
>> index a8a9811..68205ac 100644
>> --- a/sbr/lock_file.c
>> +++ b/sbr/lock_file.c
>> @@ -561,8 +561,8 @@ lockit (struct lockinfo *li)
>>      curlock = li->curlock;
>> 
>>      if ((tmpfile = m_mktemp(li->tmplock, &fd, NULL)) == NULL) {
>> -        advise(NULL, "unable to create temporary file in %s", li->tmplock);
>> -       return -1;
>> +        adios(NULL, "unable to create temporary file in %s", li->tmplock);
>> +       /* NOTREACHED */
>>      }
>> 
>>  #if 0
>>
>> it affects all locking clients, but not other users of m_mktemp().
>>
>> With a failing setgid() (fixed by another patch already) I am getting:
>>
>> % inc
>> inc: unable to set group to 6 setegid: Operation not permitted
>> inc: unable to create temporary file in /var/mail/,LCK.XXXXXX
>> inc: unable to set group to 6 setegid: Operation not permitted
>> %
>>
>> instead of
>>
>> % inc
>> inc: unable to set group to 6 setegid: Operation not permitted
>> inc: unable to create temporary file in /var/mail/,LCK.XXXXXX
>> (1 second)
>> inc: unable to create temporary file in /var/mail/,LCK.XXXXXX
>> (1 second)
>> inc: unable to create temporary file in /var/mail/,LCK.XXXXXX
>> (1 second)
>> inc: unable to create temporary file in /var/mail/,LCK.XXXXXX
>> (1 second)
>> inc: unable to lock and fopen /var/mail/sapern
>> inc: unable to set group to 6 setegid: Operation not permitted
>> %
>
> Which configuration (with or without your patch above) produces the
> following line?
>
>> inc: unable to lock and fopen /var/mail/sapern

This was the result of setgid() not working with dot locking
enabled, unless you mean something else...

//Marcin




reply via email to

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