this patch makes ezmlm-idx more compatible with the User Private Group structure on twinlark -- in particular it's useful for shared group areas such as /home/bianca. -dean --- ezmlm-0.53-idx-0.324/ezmlm-idx.c.perms Fri Sep 3 13:37:04 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-idx.c Sun Nov 4 15:06:55 2001 @@ -209,7 +209,7 @@ if (chdir(dir) == -1) strerr_die4sys(100,FATAL,ERR_SWITCH,dir,": "); - (void) umask(022); + (void) umask(002); sig_pipeignore(); /* obtain lock to write index files */ fdlock = open_append("lock"); @@ -253,7 +253,7 @@ if (!stralloc_0(&fnif)) die_nomem(); /* May not exists, so be nice and make it */ - if (mkdir(fnadir.s,0755) == -1) + if (mkdir(fnadir.s,0775) == -1) if (errno != error_exist) strerr_die4sys(100,FATAL,ERR_CREATE,fnadir.s,": "); --- ezmlm-0.53-idx-0.324/ezmlm-make.c.perms Fri Sep 3 13:37:04 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-make.c Sun Nov 4 14:32:58 2001 @@ -137,7 +137,7 @@ char *slash; { dirplusmake(slash); - if (mkdir(dirplus.s,0755) == -1) + if (mkdir(dirplus.s,0775) == -1) if ((errno != error_exist) || !flags['e' - 'a']) strerr_die4sys(111,FATAL,ERR_CREATE,dirplus.s,": "); keyaddtime(); @@ -221,7 +221,7 @@ gettimeofday(&tv,(struct timezone *) 0); keyadd(tv.tv_sec); - (void) umask(077); + (void) umask(007); /* flags with defined use. vV for version. Others free */ for (pos = 0; pos < (unsigned int) NO_FLAGS; pos++) { --- ezmlm-0.53-idx-0.324/ezmlm-return.c.perms Fri Sep 3 13:37:03 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-return.c Sun Nov 4 14:47:41 2001 @@ -67,7 +67,7 @@ void makedir(s) char *s; { - if (mkdir(s,0755) == -1) + if (mkdir(s,0775) == -1) if (errno != error_exist) strerr_die4x(111,FATAL,ERR_CREATE,s,": "); } @@ -263,7 +263,7 @@ /* to autodetect if it's a digest bounce. Bad idea! */ int fdlock; - umask(022); + umask(002); sig_pipeignore(); when = (unsigned long) now(); --- ezmlm-0.53-idx-0.324/ezmlm-send.c.perms Fri Sep 3 13:37:03 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-send.c Sun Nov 4 15:06:28 2001 @@ -239,7 +239,7 @@ if (!stralloc_0(&fnadir)) die_nomem(); /* may not exists since we run before ezmlm-send */ - if (mkdir(fnadir.s,0755) == -1) + if (mkdir(fnadir.s,0775) == -1) if (errno != error_exist) strerr_die4x(111,FATAL,ERR_CREATE,fnadir.s,": "); @@ -364,7 +364,7 @@ int opt; char *cp, *cpstart, *cpafter; - umask(022); + umask(002); sig_pipeignore(); while ((opt = getopt(argc,argv,"cCrRlLh:H:vV")) != opteof) @@ -482,7 +482,7 @@ if (!stralloc_0(&fnadir)) die_nomem(); if (!stralloc_0(&fnaf)) die_nomem(); - if (mkdir(fnadir.s,0755) == -1) + if (mkdir(fnadir.s,0775) == -1) if (errno != error_exist) strerr_die4sys(111,FATAL,ERR_CREATE,fnadir.s,": "); fdarchive = open_trunc(fnaf.s); --- ezmlm-0.53-idx-0.324/ezmlm-warn.c.perms Fri Sep 3 13:37:03 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-warn.c Sun Nov 4 14:47:47 2001 @@ -64,7 +64,7 @@ void makedir(s) char *s; { - if (mkdir(s,0755) == -1) + if (mkdir(s,0775) == -1) if (errno != error_exist) strerr_die4x(111,FATAL,ERR_CREATE,s,": "); } @@ -286,7 +286,7 @@ int opt; char ch; - (void) umask(022); + (void) umask(002); sig_pipeignore(); when = (unsigned long) now(); while ((opt = getopt(argc,argv,"dDl:t:vV")) != opteof) --- ezmlm-0.53-idx-0.324/idx.h.perms Fri Sep 3 13:37:04 1999 +++ ezmlm-0.53-idx-0.324/idx.h Sun Nov 4 15:05:23 2001 @@ -171,7 +171,7 @@ /* Mode of messages in archive. For ezmlm-0.53 this is 0744, but for */ /* "secret" lists it may make more sense to make it 0700. */ -#define MODE_ARCHIVE 0744 +#define MODE_ARCHIVE 0764 /* ezmlm-get actions (ACTION_GET also for -get in ezmlm-manage) */ #define ACTION_GET "get" @@ -232,7 +232,7 @@ /* Mode of messages in moderation queue. The owner mode is |'d with 7.*/ /* The group/world mode can be set to anything, but it really doesn't */ /* make sense to make these messages visible to anyone else. */ -#define MODE_MOD_MSG 0700 +#define MODE_MOD_MSG 0760 /* name and location of system-wide customized ezmlmrc. This is where */ /* ezmlm-make looks first (unless the -c switch is specified) before */ --- ezmlm-0.53-idx-0.324/ezmlm-cron.c.perms Fri Sep 3 13:37:03 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-cron.c Sun Nov 4 14:48:01 2001 @@ -132,7 +132,7 @@ char *sendargs[4]; int wstat; - (void) umask(077); + (void) umask(007); sig_pipeignore(); while ((opt = getopt(argc,argv,"cCdDi:lLt:w:vV")) != opteof) --- ezmlm-0.53-idx-0.324/ezmlm-get.c.perms Fri Sep 3 13:37:03 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-get.c Sun Nov 4 14:48:10 2001 @@ -838,7 +838,7 @@ msgentry *msgtable; subentry *subtable; - (void) umask(022); + (void) umask(002); sig_pipeignore(); when = now(); --- ezmlm-0.53-idx-0.324/ezmlm-manage.c.perms Fri Sep 3 13:37:04 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-manage.c Sun Nov 4 14:47:37 2001 @@ -608,7 +608,7 @@ int flagdone; register char ch; - (void) umask(022); + (void) umask(002); sig_pipeignore(); when = now(); @@ -1193,7 +1193,7 @@ strerr_die6sys(111,FATAL,ERR_WRITE,dir,"/",fneditn.s,": "); if (fsync(fd) == -1) strerr_die6sys(111,FATAL,ERR_SYNC,dir,"/",fneditn.s,": "); - if (fchmod(fd, 0600) == -1) + if (fchmod(fd, 0660) == -1) strerr_die6sys(111,FATAL,ERR_CHMOD,dir,"/",fneditn.s,": "); if (close(fd) == -1) strerr_die6sys(111,FATAL,ERR_CLOSE,dir,"/",fneditn.s,": "); --- ezmlm-0.53-idx-0.324/ezmlm-store.c.perms Fri Sep 3 13:37:04 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-store.c Sun Nov 4 14:48:36 2001 @@ -162,7 +162,7 @@ char *sendargs[4]; int child,wstat; - (void) umask(022); + (void) umask(002); sig_pipeignore(); if (!stralloc_copys(&sendopt," -")) die_nomem(); --- ezmlm-0.53-idx-0.324/open_append.c.perms Sun Jun 29 20:11:54 1997 +++ ezmlm-0.53-idx-0.324/open_append.c Sun Nov 4 14:40:11 2001 @@ -3,4 +3,4 @@ #include "open.h" int open_append(fn) char *fn; -{ return open(fn,O_WRONLY | O_NDELAY | O_APPEND | O_CREAT,0600); } +{ return open(fn,O_WRONLY | O_NDELAY | O_APPEND | O_CREAT,0660); } --- ezmlm-0.53-idx-0.324/open_trunc.c.perms Sun Jun 29 20:11:54 1997 +++ ezmlm-0.53-idx-0.324/open_trunc.c Sun Nov 4 14:40:24 2001 @@ -3,4 +3,4 @@ #include "open.h" int open_trunc(fn) char *fn; -{ return open(fn,O_WRONLY | O_NDELAY | O_TRUNC | O_CREAT,0644); } +{ return open(fn,O_WRONLY | O_NDELAY | O_TRUNC | O_CREAT,0664); } --- ezmlm-0.53-idx-0.324/ezmlm-sub.c.perms Fri Sep 3 13:37:03 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-sub.c Sun Nov 4 14:47:28 2001 @@ -29,7 +29,7 @@ int flagmysql = 1; /* use mysql if supported */ unsigned long forcehash = 0; - (void) umask(022); + (void) umask(002); while ((opt = getopt(argc,argv,"h:HmMnNrRsSvV")) != opteof) switch(opt) { case 'h': (void) scan_ulong(optarg,&forcehash); break; --- ezmlm-0.53-idx-0.324/ezmlm-unsub.c.perms Fri Sep 3 13:37:03 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-unsub.c Sun Nov 4 14:47:33 2001 @@ -25,7 +25,7 @@ unsigned long forcehash = 0L; /* do not specify the hash */ int opt; - (void) umask(022); + (void) umask(002); while ((opt = getopt(argc,argv,"h:HrRsSmMvV")) != opteof) switch(opt) { --- ezmlm-0.53-idx-0.324/ezmlm-clean.c.perms Fri Sep 3 13:37:04 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-clean.c Sun Nov 4 14:47:56 2001 @@ -304,7 +304,7 @@ int fdlock; int delay; int opt; - (void) umask(022); + (void) umask(002); sig_pipeignore(); when = now(); --- ezmlm-0.53-idx-0.324/ezmlm-gate.c.perms Fri Sep 3 13:37:03 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-gate.c Sun Nov 4 14:48:06 2001 @@ -46,7 +46,7 @@ char *pmod; int opt; - umask(022); + umask(002); sig_pipeignore(); /* storeopts to ezmlm-store only. Others to both (ezmlm-store may */ /* pass them on to ezmlm-send. */ --- ezmlm-0.53-idx-0.324/ezmlm-limit.c.perms Fri Sep 3 13:37:04 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-limit.c Sun Nov 4 14:48:19 2001 @@ -56,7 +56,7 @@ unsigned long numwhen = 0L; int fd,fdlock; - (void) umask(022); + (void) umask(002); sig_pipeignore(); when = (unsigned long) now(); --- ezmlm-0.53-idx-0.324/ezmlm-moderate.c.perms Fri Sep 3 13:37:04 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-moderate.c Sun Nov 4 14:48:24 2001 @@ -215,7 +215,7 @@ char *cp,*cpnext,*cpfirst,*cplast,*cpafter; int wstat; - (void) umask(022); + (void) umask(002); sig_pipeignore(); when = now(); --- ezmlm-0.53-idx-0.324/ezmlm-receipt.c.perms Fri Sep 3 13:37:03 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-receipt.c Sun Nov 4 14:48:28 2001 @@ -174,7 +174,7 @@ unsigned int len; char *cp; - umask(022); + umask(002); sig_pipeignore(); when = (unsigned long) now(); --- ezmlm-0.53-idx-0.324/ezmlm-request.c.perms Fri Sep 3 13:37:04 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-request.c Sun Nov 4 14:48:31 2001 @@ -319,7 +319,7 @@ int opt; unsigned int pos,pos1,len,last; - (void)umask(022); + (void)umask(002); sig_pipeignore(); while ((opt = getopt(argc,argv,"f:F:vV")) != opteof) --- ezmlm-0.53-idx-0.324/ezmlm-tstdig.c.perms Fri Sep 3 13:37:03 1999 +++ ezmlm-0.53-idx-0.324/ezmlm-tstdig.c Sun Nov 4 14:48:40 2001 @@ -51,7 +51,7 @@ unsigned long when, tsttime, digwhen; int fd,fdlock; - (void) umask(022); + (void) umask(002); sig_pipeignore(); when = (unsigned long) now();