procmail
[Top] [All Lists]

Permissions in the spool

1996-10-07 09:37:47

I asked a question about this a few days ago but I'm still stuck:

procmail when writing to a user's spool file in a spool that is 1777
wants to write the file 600. 

when the directory is 775 or something similar to that it is willing
to write it 660.

Due to some prior constraints we need to maintain the mail spool
directories on the machines in question as 1777.

I had thought that changing something with the following would change
this situation:

#define UPDATE_MASK   S_IXOTH    /* bit set on mailboxes when mail arrived */
#define OVERRIDE_MASK (S_IXUSR|S_ISUID|S_ISGID|S_ISVTX)  /* if found  set */
           /* the permissions on the mailbox will be left untouched */
#define INIT_UMASK    (S_IRWXG|S_IRWXO)                  /* == 077 */
#define GROUPW_UMASK    (INIT_UMASK&~S_IRWXG)            /* == 007 */
#define NORMperm        \
 (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH|UPDATE_MASK)
             /* == 0667, normal mode bits used to create files, before
umask */
#define READperm        (S_IRUSR|S_IRGRP|S_IROTH)        /* == 0444 */
#define NORMdirperm     (S_IRWXU|S_IRWXG|S_IRWXO)        /* == 0777 */

But I'm afraid I can't figure out what to change. The source seems to 
indicate that the screenmailbox function in misc.c controls what is
going on but from what I can tell it doesn't give much choice, i.e. it
throws away group write if the directory is world writable no matter
what. 

Of course it is highly likely I'm not understanding the code. It's
mighty dense.

If someone could give me relatively explicit instructions on how to
deal with this I would be very grateful.

--
Chris Dent <cdent(_at_)indiana(_dot_)edu> 
http://detritus.ucs.indiana.edu/~cdent/

<Prev in Thread] Current Thread [Next in Thread>