David Levine <levinedl(_at_)acm(_dot_)org> 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
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers