--- majordomo-1.94.5/Makefile.orig Tue Jan 18 11:01:17 2000 +++ majordomo-1.94.5/Makefile Tue May 23 07:05:24 2000 @@ -63,7 +63,8 @@ # passed to processes run by "wrapper" W_SHELL = /bin/sh W_PATH = /bin:/usr/bin:/usr/ucb -W_MAJORDOMO_CF = $(W_HOME)/majordomo.cf +W_MAJORDOMO_CF = majordomo.cf +W_MAJORDOMO_CFDIR = $(W_HOME)/config # A directory for temp files.. TMPDIR = /usr/tmp @@ -77,7 +78,8 @@ WRAPPER_FLAGS = -DBIN=\"$(W_HOME)\" -DPATH=\"PATH=$(W_PATH)\" > \ -DHOME=\"HOME=$(W_HOME)\" -DSHELL=\"SHELL=$(W_SHELL)\" \ - -DMAJORDOMO_CF=\"MAJORDOMO_CF=$(W_MAJORDOMO_CF)\" \ + -DMAJORDOMO_CF=\"MAJORDOMO_CF=$(W_MAJORDOMO_CFDIR)/$(W_MAJORDOMO_CF)\" \ + -DMAJORDOMO_CFDIR=\"MAJORDOMO_CFDIR=$(W_MAJORDOMO_CFDIR)\" \ $(POSIX) INSTALL = ./install.sh --- majordomo-1.94.5/archive2.pl.orig Fri Jan 7 08:00:49 2000 +++ majordomo-1.94.5/archive2.pl Tue May 23 07:47:09 2000 @@ -50,7 +50,7 @@ # Read and execute the .cf file $cf = $ENV{"MAJORDOMO_CF"} || "/etc/majordomo.cf"; if ($ARGV[0] eq "-C") { - $cf = $ARGV[1]; + $cf = "$ENV{'MAJORDOMO_CFDIR'}/$ARGV[1]" unless $ARGV[1] =~ /\//; shift(@ARGV); shift(@ARGV); } --- majordomo-1.94.5/contrib/archive_mh.pl.orig Mon Mar 10 12:40:41 1997 +++ majordomo-1.94.5/contrib/archive_mh.pl Tue May 23 07:50:23 2000 @@ -17,9 +17,9 @@ $ENV{'PATH'} = "/bin:/usr/bin:/usr/ucb"; # Read and execute the .cf file -$cf = $ENV{"MAJORDOMO_CF"} || "/tools/majordomo-1.56/majordomo.cf"; +$cf = $ENV{"MAJORDOMO_CF"} || "/etc/majordomo.cf"; if ($ARGV[0] eq "-C") { - $cf = $ARGV[1]; + $cf = "$ENV{'MAJORDOMO_CFDIR'}/$ARGV[1]" unless $ARGV[1] =~ /\//; shift(@ARGV); shift(@ARGV); } --- majordomo-1.94.5/bounce-remind.orig Mon Dec 9 13:49:46 1996 +++ majordomo-1.94.5/bounce-remind Tue May 23 07:47:27 2000 @@ -20,7 +20,7 @@ # Read and execute the .cf file $cf = $ENV{"MAJORDOMO_CF"} || "/etc/majordomo.cf"; if ($ARGV[0] eq "-C") { - $cf = $ARGV[1]; + $cf = "$ENV{'MAJORDOMO_CFDIR'}/$ARGV[1]"; shift(@ARGV); shift(@ARGV); } --- majordomo-1.94.5/config-test.orig Wed Aug 27 12:17:13 1997 +++ majordomo-1.94.5/config-test Tue May 23 16:10:05 2000 @@ -117,6 +117,8 @@ print "\n\tNon obvious things that cause headaches:\n\n"; &header(''); +$ARGV[0] = ($ARGV[0] && $ARGV[0] !~ /\//) ? + "$ENV{'MAJORDOMO_CFDIR'}/$ARGV[0]" : ''; $cf = $ARGV[0] || $ENV{'MAJORDOMO_CF'}; if (eval "require '$cf'") { --- majordomo-1.94.5/digest.orig Fri Jan 7 08:04:34 2000 +++ majordomo-1.94.5/digest Tue May 23 16:02:49 2000 @@ -322,6 +322,8 @@ &abort("-C used without -l"); } else { # Read and execute the .cf file + $opt_c = ($opt_c && $opt_c !~ /\//) ? + "$ENV{'MAJORDOMO_CFDIR'}/$opt_c" : ''; $cf = $opt_c || $ENV{"MAJORDOMO_CF"} || "/etc/majordomo.cf"; require "$cf"; --- majordomo-1.94.5/majordomo.orig Thu Jan 13 14:29:31 2000 +++ majordomo-1.94.5/majordomo Tue May 23 07:48:42 2000 @@ -29,7 +29,7 @@ while ($ARGV[0]) { # parse for config file or default list if ($ARGV[0] =~ /^-C$/i) { # sendmail v8 clobbers case - $cf = $ARGV[1]; + $cf = "$ENV{'MAJORDOMO_CFDIR'}/$ARGV[1]" unless $ARGV[1] =~ /\//; shift(@ARGV); shift(@ARGV); } elsif ($ARGV[0] eq "-l") { --- majordomo-1.94.5/medit.orig Mon Apr 28 15:38:05 1997 +++ majordomo-1.94.5/medit Tue May 23 07:48:55 2000 @@ -19,7 +19,7 @@ # Read and execute the .cf file $cf = $ENV{"MAJORDOMO_CF"} || "/etc/majordomo.cf"; if ($ARGV[0] eq "-C") { - $cf = $ARGV[1]; + $cf = "$ENV{'MAJORDOMO_CFDIR'}/$ARGV[1]" unless $ARGV[1] =~ /\//; shift(@ARGV); shift(@ARGV); } --- majordomo-1.94.5/contrib/new-list.orig Mon Dec 9 13:50:45 1996 +++ majordomo-1.94.5/contrib/new-list Tue May 23 07:50:41 2000 @@ -15,7 +15,7 @@ # Read and execute the .cf file $cf = $ENV{"MAJORDOMO_CF"} || "/etc/majordomo.cf"; if ($ARGV[0] eq "-C") { - $cf = $ARGV[1]; + $cf = "$ENV{'MAJORDOMO_CFDIR'}/$ARGV[1]" unless $ARGV[1] =~ /\//; shift(@ARGV); shift(@ARGV); } --- majordomo-1.94.5/request-answer.orig Fri Jan 7 08:10:18 2000 +++ majordomo-1.94.5/request-answer Tue May 23 07:49:10 2000 @@ -16,7 +16,7 @@ # Read and execute the .cf file $cf = $ENV{"MAJORDOMO_CF"} || "/etc/majordomo.cf";> if ($ARGV[0] eq "-C") { - $cf = $ARGV[1]; + $cf = "$ENV{'MAJORDOMO_CFDIR'}/$ARGV[1]" unless $ARGV[1] =~ /\//; shift(@ARGV); shift(@ARGV); } --- majordomo-1.94.5/resend.orig Fri Jan 7 12:32:39 2000 +++ majordomo-1.94.5/resend Tue May 23 16:02:37 2000 @@ -79,6 +79,9 @@ } # Read and execute the .cf file +$cfdir = $ENV{"MAJORDOMO_CFDIR"}; +$opt_C = ($opt_C && $opt_C !~ /\//) ? "$cfdir/$opt_C" : ''; +$opt_c = ($opt_c && $opt_c !~ /\//) ? "$cfdir/$opt_c" : ''; $cf = $opt_C || $opt_c || $ENV{"MAJORDOMO_CF"} || "/etc/majordomo.cf"; # Despite not having a place to send the remains of the body, --- majordomo-1.94.5/contrib/sequencer.orig Mon Dec 9 13:50:48 1996 +++ majordomo-1.94.5/contrib/sequencer Tue May 23 07:50:58 2000 @@ -48,7 +48,7 @@ # Read and execute the .cf file $cf = $ENV{"MAJORDOMO_CF"} || "/etc/majordomo.cf"; if ($ARGV[0] eq "-C") { - $cf = $ARGV[1]; + $cf = "$ENV{'MAJORDOMO_CFDIR'}/$ARGV[1]" unless $ARGV[1] =~ /\//; shift(@ARGV); shift(@ARGV); } --- majordomo-1.94.5/wrapper.c.orig Wed Aug 27 12:01:12 1997 +++ majordomo-1.94.5/wrapper.c Tue May 23 07:06:23 2000 @@ -42,20 +42,27 @@ # define SHELL "SHELL=/bin/sh" #endif +#ifndef MAJORDOMO_CF +# error "MAJORDOMO_CF not defined; edit Makefile" +#endif + +#ifndef MAJORDOMO_CFDIR +# error "MAJORDOMO_CFDIR not defined; edit Makefile" +#endif + char * new_env[] = { HOME, /* 0 */ PATH, /* 1 */ SHELL, /* 2 */ -#ifdef MAJORDOMO_CF MAJORDOMO_CF, /* 3 */ -#endif + MAJORDOMO_CFDIR, /* 4 */ 0, /* possibly for USER or LOGNAME */ 0, /* possible for LOGNAME */ 0, /* possibly for timezone */ 0 }; -int new_env_size = 7; /* to prevent overflow problems */ +int new_env_size = 8; /* to prevent overflow problems */ main(argc, argv, env) int argc; @@ -89,11 +96,7 @@ * if they exist. */ -#ifdef MAJORDOMO_CF - e = 4; /* the first unused slot in new_env[] */ -#else - e = 3; /* the first unused slot in new_env[] */ -#endif + e = 5; /* the first unused slot in new_env[] */ for (i = 0 ; env[i] != NULL && e <= new_env_size; i++) { if ((strncmp(env[i], "USER=", 5) == 0) || @@ -153,5 +156,6 @@ fprintf(stderr, " PATH is %s,\n", PATH); fprintf(stderr, " SHELL is %s,\n", SHELL); fprintf(stderr, " MAJORDOMO_CF is %s\n", MAJORDOMO_CF); + fprintf(stderr, " MAJORDOMO_CFDIR is %s\n", MAJORDOMO_CFDIR); exit(EX_OSERR); }