head 1.7; access; symbols pkgsrc-2026Q1:1.7.0.118 pkgsrc-2026Q1-base:1.7 pkgsrc-2025Q4:1.7.0.116 pkgsrc-2025Q4-base:1.7 pkgsrc-2025Q3:1.7.0.114 pkgsrc-2025Q3-base:1.7 pkgsrc-2025Q2:1.7.0.112 pkgsrc-2025Q2-base:1.7 pkgsrc-2025Q1:1.7.0.110 pkgsrc-2025Q1-base:1.7 pkgsrc-2024Q4:1.7.0.108 pkgsrc-2024Q4-base:1.7 pkgsrc-2024Q3:1.7.0.106 pkgsrc-2024Q3-base:1.7 pkgsrc-2024Q2:1.7.0.104 pkgsrc-2024Q2-base:1.7 pkgsrc-2024Q1:1.7.0.102 pkgsrc-2024Q1-base:1.7 pkgsrc-2023Q4:1.7.0.100 pkgsrc-2023Q4-base:1.7 pkgsrc-2023Q3:1.7.0.98 pkgsrc-2023Q3-base:1.7 pkgsrc-2023Q2:1.7.0.96 pkgsrc-2023Q2-base:1.7 pkgsrc-2023Q1:1.7.0.94 pkgsrc-2023Q1-base:1.7 pkgsrc-2022Q4:1.7.0.92 pkgsrc-2022Q4-base:1.7 pkgsrc-2022Q3:1.7.0.90 pkgsrc-2022Q3-base:1.7 pkgsrc-2022Q2:1.7.0.88 pkgsrc-2022Q2-base:1.7 pkgsrc-2022Q1:1.7.0.86 pkgsrc-2022Q1-base:1.7 pkgsrc-2021Q4:1.7.0.84 pkgsrc-2021Q4-base:1.7 pkgsrc-2021Q3:1.7.0.82 pkgsrc-2021Q3-base:1.7 pkgsrc-2021Q2:1.7.0.80 pkgsrc-2021Q2-base:1.7 pkgsrc-2021Q1:1.7.0.78 pkgsrc-2021Q1-base:1.7 pkgsrc-2020Q4:1.7.0.76 pkgsrc-2020Q4-base:1.7 pkgsrc-2020Q3:1.7.0.74 pkgsrc-2020Q3-base:1.7 pkgsrc-2020Q2:1.7.0.70 pkgsrc-2020Q2-base:1.7 pkgsrc-2020Q1:1.7.0.50 pkgsrc-2020Q1-base:1.7 pkgsrc-2019Q4:1.7.0.72 pkgsrc-2019Q4-base:1.7 pkgsrc-2019Q3:1.7.0.68 pkgsrc-2019Q3-base:1.7 pkgsrc-2019Q2:1.7.0.66 pkgsrc-2019Q2-base:1.7 pkgsrc-2019Q1:1.7.0.64 pkgsrc-2019Q1-base:1.7 pkgsrc-2018Q4:1.7.0.62 pkgsrc-2018Q4-base:1.7 pkgsrc-2018Q3:1.7.0.60 pkgsrc-2018Q3-base:1.7 pkgsrc-2018Q2:1.7.0.58 pkgsrc-2018Q2-base:1.7 pkgsrc-2018Q1:1.7.0.56 pkgsrc-2018Q1-base:1.7 pkgsrc-2017Q4:1.7.0.54 pkgsrc-2017Q4-base:1.7 pkgsrc-2017Q3:1.7.0.52 pkgsrc-2017Q3-base:1.7 pkgsrc-2017Q2:1.7.0.48 pkgsrc-2017Q2-base:1.7 pkgsrc-2017Q1:1.7.0.46 pkgsrc-2017Q1-base:1.7 pkgsrc-2016Q4:1.7.0.44 pkgsrc-2016Q4-base:1.7 pkgsrc-2016Q3:1.7.0.42 pkgsrc-2016Q3-base:1.7 pkgsrc-2016Q2:1.7.0.40 pkgsrc-2016Q2-base:1.7 pkgsrc-2016Q1:1.7.0.38 pkgsrc-2016Q1-base:1.7 pkgsrc-2015Q4:1.7.0.36 pkgsrc-2015Q4-base:1.7 pkgsrc-2015Q3:1.7.0.34 pkgsrc-2015Q3-base:1.7 pkgsrc-2015Q2:1.7.0.32 pkgsrc-2015Q2-base:1.7 pkgsrc-2015Q1:1.7.0.30 pkgsrc-2015Q1-base:1.7 pkgsrc-2014Q4:1.7.0.28 pkgsrc-2014Q4-base:1.7 pkgsrc-2014Q3:1.7.0.26 pkgsrc-2014Q3-base:1.7 pkgsrc-2014Q2:1.7.0.24 pkgsrc-2014Q2-base:1.7 pkgsrc-2014Q1:1.7.0.22 pkgsrc-2014Q1-base:1.7 pkgsrc-2013Q4:1.7.0.20 pkgsrc-2013Q4-base:1.7 pkgsrc-2013Q3:1.7.0.18 pkgsrc-2013Q3-base:1.7 pkgsrc-2013Q2:1.7.0.16 pkgsrc-2013Q2-base:1.7 pkgsrc-2013Q1:1.7.0.14 pkgsrc-2013Q1-base:1.7 pkgsrc-2012Q4:1.7.0.12 pkgsrc-2012Q4-base:1.7 pkgsrc-2012Q3:1.7.0.10 pkgsrc-2012Q3-base:1.7 pkgsrc-2012Q2:1.7.0.8 pkgsrc-2012Q2-base:1.7 pkgsrc-2012Q1:1.7.0.6 pkgsrc-2012Q1-base:1.7 pkgsrc-2011Q4:1.7.0.4 pkgsrc-2011Q4-base:1.7 pkgsrc-2011Q3:1.7.0.2 pkgsrc-2011Q3-base:1.7 pkgsrc-2011Q2:1.6.0.4 pkgsrc-2011Q2-base:1.6 pkgsrc-2011Q1:1.6.0.2 pkgsrc-2011Q1-base:1.6 pkgsrc-2010Q4:1.4.0.2 pkgsrc-2010Q4-base:1.4 pkgsrc-2010Q3:1.3.0.68 pkgsrc-2010Q3-base:1.3 pkgsrc-2010Q2:1.3.0.66 pkgsrc-2010Q2-base:1.3 pkgsrc-2010Q1:1.3.0.64 pkgsrc-2010Q1-base:1.3 pkgsrc-2009Q4:1.3.0.62 pkgsrc-2009Q4-base:1.3 pkgsrc-2009Q3:1.3.0.60 pkgsrc-2009Q3-base:1.3 pkgsrc-2009Q2:1.3.0.58 pkgsrc-2009Q2-base:1.3 pkgsrc-2009Q1:1.3.0.56 pkgsrc-2009Q1-base:1.3 pkgsrc-2008Q4:1.3.0.54 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.52 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.50 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.48 pkgsrc-2008Q2-base:1.3 cwrapper:1.3.0.46 pkgsrc-2008Q1:1.3.0.44 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.42 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.40 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.38 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.36 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.34 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.32 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.30 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.28 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.26 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.24 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.22 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.20 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.18 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.16 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.14 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.3.0.12 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.3.0.10 pkgsrc-2003Q4-base:1.3 netbsd-1-6-1:1.3.0.6 netbsd-1-6-1-base:1.3 netbsd-1-6:1.3.0.8 netbsd-1-6-RELEASE-base:1.3 pkgviews:1.3.0.4 pkgviews-base:1.3 buildlink2:1.3.0.2 buildlink2-base:1.3 netbsd-1-5-PATCH003:1.3 netbsd-1-5-PATCH001:1.3 netbsd-1-5-RELEASE:1.3 netbsd-1-4-PATCH003:1.3 netbsd-1-4-PATCH002:1.3 comdex-fall-1999:1.1.1.1 netbsd-1-4-PATCH001:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.7 date 2011.08.27.15.47.43; author schnoebe; state Exp; branches; next 1.6; 1.6 date 2011.01.29.19.39.14; author spz; state Exp; branches; next 1.5; 1.5 date 2011.01.29.17.16.33; author spz; state Exp; branches; next 1.4; 1.4 date 2010.10.30.23.48.36; author spz; state Exp; branches; next 1.3; 1.3 date 2000.01.09.01.28.07; author wiz; state Exp; branches; next 1.2; 1.2 date 99.11.27.16.50.03; author hubertf; state Exp; branches; next 1.1; 1.1 date 99.06.08.17.51.26; author bad; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 99.06.08.17.51.26; author bad; state Exp; branches; next ; desc @@ 1.7 log @Remove the uses of ctime.pl and getopts.pl, since those are going away soon. @ text @$NetBSD$ avoid the wrapper + -C trap update to be more friendly to perl 5.14 --- majordomo.orig 2000-01-13 17:29:31.000000000 +0000 +++ majordomo @@@@ -24,8 +24,11 @@@@ # The mj_ prefix is reserved for tools that are part of majordomo proper. $main'program_name = 'mj_majordomo';#'; -# Read and execute the .cf file -$cf = $ENV{"MAJORDOMO_CF"} || "/etc/majordomo.cf"; +# Read and execute the .cf file. For security reasons, make the env value win +# (the wrapper will set the env value and setuid to majordomo. If you want +# to test a config and are properly authorized, su to the majordomo user +# and don't use the wrapper +$cf = "/etc/majordomo.cf"; while ($ARGV[0]) { # parse for config file or default list if ($ARGV[0] =~ /^-C$/i) { # sendmail v8 clobbers case @@@@ -40,6 +43,11 @@@@ while ($ARGV[0]) { # parse for config fi die "Unknown argument $ARGV[0]\n"; } } + +if ($ENV{"MAJORDOMO_CF"}) { + $cf = $ENV{"MAJORDOMO_CF"}; +} + if (! -r $cf) { die("$cf not readable; stopped"); } @@@@ -58,8 +66,9 @@@@ if (! -t STDERR) { print STDERR "$0: starting\n" if $DEBUG; # All these should be in the standard PERL library +unshift(@@INC, $bindir); unshift(@@INC, $homedir); -require "ctime.pl"; # To get MoY definitions for month abbrevs +use POSIX qw(ctime); require "majordomo_version.pl"; # What version of Majordomo is this? require "majordomo.pl"; # all sorts of general-purpose Majordomo subs require "shlock.pl"; # NNTP-style file locking @@@@ -750,7 +759,7 @@@@ sub do_info { while () { print REPLY $_; } - print REPLY "\n[Last updated ", &chop_nl(&ctime((stat(INFO))[9])), + print REPLY "\n[Last updated ", &chop_nl(ctime((stat(INFO))[9])), "]\n" if !&cf_ck_bool($clean_list,"date_info"); &lclose(INFO); } else { @@@@ -778,7 +787,7 @@@@ sub do_newinfo { (stat("$listdir/$clean_list.info"))[2,4,5]; $mode = (0664) if !$mode; if (&lopen(INFO, ">", "$listdir/$clean_list.info")) { - print INFO "[Last updated on: ", &chop_nl(&ctime(time())), + print INFO "[Last updated on: ", &chop_nl(ctime(time())), "]\n" if &cf_ck_bool($clean_list,"date_info"); while (<>) { $_ = &chop_nl($_); @@@@ -848,7 +857,7 @@@@ sub do_intro { while () { print REPLY $_; } - print REPLY "\n[Last updated ", &chop_nl(&ctime((stat(INFO))[9])), + print REPLY "\n[Last updated ", &chop_nl(ctime((stat(INFO))[9])), "]\n" if !&cf_ck_bool($clean_list,"date_intro"); &lclose(INFO); } else { @@@@ -872,7 +881,7 @@@@ sub do_newintro { if (&valid_passwd($listdir, $clean_list, $passwd)) { # The password is valid, so write the new intro if (&lopen(INFO, ">", "$listdir/$clean_list.intro")) { - print INFO "[Last updated on: ", &chop_nl(&ctime(time())), + print INFO "[Last updated on: ", &chop_nl(ctime(time())), "]\n" if &cf_ck_bool($clean_list,"date_intro"); while (<>) { $_ = &chop_nl($_); @@@@ -936,7 +945,7 @@@@ sub do_config { print REPLY $_; } print REPLY "\n#[Last updated ", - &chop_nl(&ctime((stat(LCONFIG))[9])), "]\n"; + &chop_nl(ctime((stat(LCONFIG))[9])), "]\n"; close(LCONFIG) || print REPLY "Error writing config for $clean_list: $!"; @@@@ -1095,7 +1104,7 @@@@ sub do_mkdigest { # The password is valid, so run digest open(DIGEST, - "$homedir/digest -m -C -l $list $list_outgoing 2>&1 |"); + "$bindir/digest -m -C -l $list $list_outgoing 2>&1 |"); @@digest_errors = ; close(DIGEST); @ 1.6 log @missed three more command line config file options added descriptions to the patches @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.5 2011/01/29 17:16:33 spz Exp $ d4 1 d34 1 a34 1 @@@@ -58,6 +66,7 @@@@ if (! -t STDERR) { d40 2 a41 1 require "ctime.pl"; # To get MoY definitions for month abbrevs d43 47 @ 1.5 log @stop majordomo from chowning /var/tmp to user majordom due to a superannuated default in mk/defaults/mk.conf remove the non-shared defaults and put in the setting that actually gets used by more than one package (namely, MAJORDOMO_HOMEDIR) don't make the majordom user own more than it actually needs to make resend, archive, request-answer and medit honor the MAJORDOMO_CF environment variable over the command line option, so that someone calling these via the wrapper (which sets the environment variable) can't make the majordom user execute random perl code by specifying it as config file. Thanks to salo for finding this issue. @ text @d1 3 a3 1 $NetBSD$ d13 1 a13 1 +# Read and execute the .cf file. for security reasons, make the env value win @ 1.4 log @make the wrapper use getpwnam to determine uid and gid of the majordomo user adjust the Makefile to fit package beautification and lint shutup (like eg comments for some patches) @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.3 2000/01/09 01:28:07 wiz Exp $ d3 29 a31 3 --- majordomo.orig Sat Nov 27 17:28:39 1999 +++ majordomo Sat Nov 27 17:29:16 1999 @@@@ -58,6 +58,7 @@@@ d39 1 a39 1 @@@@ -1138,7 +1139,7 @@@@ @ 1.3 log @RCS tags added @ text @d1 2 a2 1 $NetBSD$ @ 1.2 log @ - Add note that majordom can be removed from /etc/group - Call 'digest' from correct dir. Addresses PR 8814 by Berndt Josef Wulf - Add some headers to wrapper.c to fix several compile time warnings; partly submitted in PR 8756 by Berndt Josef Wulf @ text @d1 1 @ 1.1 log @Initial revision @ text @d1 4 a4 5 $NetBSD$ --- ./majordomo.orig Wed Aug 27 08:55:29 1997 +++ ./majordomo Tue Jun 8 10:55:13 1999 @@@@ -59,4 +59,5 @@@@ d10 10 @ 1.1.1.1 log @Initial import of pkg for majordomo-1.94.4, the popular mailing list manager. Packaged by Brook Milligan brook@@trillium.NMSU.Edu. @ text @@