procmail
[Top] [All Lists]

Re: Procmail as a LMDA on SOLARIS

1997-05-19 11:10:00
On Thu, 15 May 1997 18:11:15 -0500, Philip Guenther 
<guenther(_at_)gac(_dot_)edu> said:

procmail can *always* do dot-locking, so don't worry about or try to
disable it.

Beware, though, that if you've got a mode 775 group mail mail spool (which
I presume Solaris, being a SVR4, does) dot locking won't work with pre7 or
pre6 and maybe other (I don't know when the bug was introduced) without a
patch.  Here's the one from Stephen.

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>