procmail
[Top] [All Lists]

Re: Help! kernel file-locking problems (ugly)

1997-07-29 22:11:00
On Tue, 29 Jul 1997 21:56:56 -0400 (EDT), "Jeff A. Earickson" 
<jaearick(_at_)colby(_dot_)edu> said:

    I am using procmail3.11-pre7 as the local delivery agent within 
sendmail 8.8.6 on our central mail server, an HP 9000 running HP-UX 
10.20. [...]

procmail: Bypassed locking "/var/mail/userid.lock"  <-- ???
[...]

Why do I get that "Bypassed locking" message?

There's a bug in pre7 on systems which use a mode 775 group mail mail
spool which has those symptoms.  If that applies to your system then
this patch (from Stephen) will fix it.

Index: locking.c
===================================================================
RCS file: /var/lib/cvs/procmail/src/locking.c,v
retrieving revision 1.47
diff -u -r1.47 locking.c
--- locking.c   1997/04/03 01:58:44     1.47
+++ locking.c   1997/04/28 10:42:43
@@ -29,14 +29,14 @@
      return;
   if(!strcmp(name,defdeflock))        /* is it the system mailbox lockfile? */
    { locktype=doCHECK|doLOCK;
+     if(sgid!=gid&&setegid(sgid))      /* try and get some extra permissions */
 #ifndef fdlock
-     if(!accspooldir)
-      { yell("Bypassed locking",name);
-       return;
-      }
-     else
+        if(!accspooldir)
+         { yell("Bypassed locking",name);
+          return;
+         }
 #endif
-       setegid(sgid);                 /* try and get some extra permissions */
+        ;
    }
   name=tstrdup(name); /* allocate now, so we won't hang on memory *and* lock */
   for(lcking|=lck_LOCKFILE;;)

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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Help! kernel file-locking problems (ugly), Roderick Schertler <=