[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] dot locking broken?
From: |
David Levine |
Subject: |
Re: [Nmh-workers] dot locking broken? |
Date: |
Fri, 13 Feb 2015 09:00:37 -0500 |
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
David
Re: [Nmh-workers] dot locking broken?, Marcin Cieslak, 2015/02/13
Re: [Nmh-workers] dot locking broken?, David Levine, 2015/02/11