aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mailman
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-02-11 06:25:02 +0800
committerpav <pav@FreeBSD.org>2005-02-11 06:25:02 +0800
commitb6113f014ba989705e587c8471448638828da999 (patch)
treeea79da79be2d331caf3a3546181b15f547c397e8 /mail/mailman
parent21cd6ee7daaa51f1e233a1b9c9a7b98dfda7d873 (diff)
downloadfreebsd-ports-gnome-b6113f014ba989705e587c8471448638828da999.tar.gz
freebsd-ports-gnome-b6113f014ba989705e587c8471448638828da999.tar.zst
freebsd-ports-gnome-b6113f014ba989705e587c8471448638828da999.zip
- Fix a security problem in private mailing list archives could allow anyone to
read any file on web server. - Minor port changes PR: ports/77364 Submitted by: Vivek Khera <vivek@khera.org> (maintainer) Security: CVE number CAN-2005-0202
Diffstat (limited to 'mail/mailman')
-rw-r--r--mail/mailman/Makefile6
-rw-r--r--mail/mailman/files/patch-Mailman::Cgi::private.py34
-rw-r--r--mail/mailman/pkg-deinstall26
-rw-r--r--mail/mailman/pkg-install18
4 files changed, 69 insertions, 15 deletions
diff --git a/mail/mailman/Makefile b/mail/mailman/Makefile
index 7ae3d023512d..ea3f497528ab 100644
--- a/mail/mailman/Makefile
+++ b/mail/mailman/Makefile
@@ -7,7 +7,7 @@
PORTNAME= mailman
PORTVERSION= 2.1.5
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES?= mail
MASTER_SITES= http://www.list.org/ \
${MASTER_SITE_GNU} \
@@ -125,6 +125,10 @@ post-configure:
@ ${SED} -e 's#%%MAILMANDIR%%#${MAILMANDIR}#g' \
-e 's#%%DOCSDIR%%#${DOCSDIR}#g' -e 's#%%LOCALBASE%%#${LOCALBASE}#g' \
${MASTERDIR}/pkg-message > ${PKGMESSAGE}
+# port system auditors complain if dir is created prior to install
+# but configure demands it be there. we delete it now if empty,
+# so it will be re-created. For existing installs, this is ignored
+ @- rmdir ${MAILMANDIR} 2> /dev/null
pre-install:
@ ${SH} ${PKGREQ} INSTALL
diff --git a/mail/mailman/files/patch-Mailman::Cgi::private.py b/mail/mailman/files/patch-Mailman::Cgi::private.py
new file mode 100644
index 000000000000..08fd1390c7a6
--- /dev/null
+++ b/mail/mailman/files/patch-Mailman::Cgi::private.py
@@ -0,0 +1,34 @@
+Index: Mailman/Cgi/private.py
+===================================================================
+RCS file: /cvsroot/mailman/mailman/Mailman/Cgi/private.py,v
+retrieving revision 2.16.2.1
+diff -u -r2.16.2.1 private.py
+--- private.py 8 Feb 2003 07:13:50 -0000 2.16.2.1
++++ private.py 10 Feb 2005 03:34:21 -0000
+@@ -1,4 +1,4 @@
+-# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
++# Copyright (C) 1998-2005 by the Free Software Foundation, Inc.
+ #
+ # This program is free software; you can redistribute it and/or
+ # modify it under the terms of the GNU General Public License
+@@ -35,13 +35,17 @@
+ _ = i18n._
+ i18n.set_language(mm_cfg.DEFAULT_SERVER_LANGUAGE)
+
++SLASH = '/'
++
+
+
+ def true_path(path):
+ "Ensure that the path is safe by removing .."
+- path = path.replace('../', '')
+- path = path.replace('./', '')
+- return path[1:]
++ parts = path.split(SLASH)
++ safe = [x for x in parts if x not in ('.', '..')]
++ if parts <> safe:
++ syslog('mischief', 'Directory traversal attack thwarted')
++ return SLASH.join(safe)[1:]
+
+
+
diff --git a/mail/mailman/pkg-deinstall b/mail/mailman/pkg-deinstall
index 180ac640fa0d..1ab07c748f92 100644
--- a/mail/mailman/pkg-deinstall
+++ b/mail/mailman/pkg-deinstall
@@ -9,9 +9,15 @@ case $2 in
DEINSTALL)
echo "---> Starting deinstall script:"
- echo "---> Zeroing crontab(5) file belonging to user \"%%USER%%\""
- /usr/bin/crontab -u %%USER%% /dev/null
- echo " (The crontab(5) will be deleted completely when user %%USER%% is removed.)"
+ if /usr/bin/crontab -u "%%USER%%" -l | \
+ /usr/bin/diff - %%MAILMANDIR%%/cron/crontab.in >/dev/null 2>&1 ; then
+ echo "---> Zeroing crontab for \"%%USER%%\""
+ /usr/bin/crontab -u "%%USER%%" /dev/null
+ else
+ echo "---> Crontab for \"%%USER%%\" not removed: please deinstall"
+ echo "---> manually if you no-longer wish to use Mailman. eg:"
+ echo "---> /usr/bin/crontab -u "%%USER%%" -r"
+ fi
echo "---> Stopping Mailman's qrunner daemon"
%%PREFIX%%/etc/rc.d/mailman.sh stop >/dev/null 2>&1
@@ -36,19 +42,15 @@ POST-DEINSTALL)
if [ -d %%MAILMANDIR%% ]; then
echo '---> %%MAILMANDIR%% is not empty - this installation may have active lists!'
- echo '---> - The "%%USER%%" user and "%%GROUP%%" group were therefore not deleted.'
- echo '---> - You may delete them with "pw groupdel %%GROUP%%; pw userdel %%USER%%".'
-
echo "---> Restoring \"last_mailman_version\" file"
[ -d %%MAILMANDIR%%/data ] || /bin/mkdir %%MAILMANDIR%%/data
/bin/mv -f /var/tmp/last_mailman_version %%MAILMANDIR%%/data/
-
- else
- echo "---> Removing group \"%%GROUP%%\""
- /usr/sbin/pw groupdel -n %%GROUP%%
- echo "---> Removing user \"%%USER%%\""
- echo 'y' | /usr/sbin/pw userdel -n %%USER%%
fi
+
+ echo '---> - If you are not using Mailman any more, you should manually delete'
+ echo '---> - the "%%USER%%" user and "%%GROUP%%" group.'
+ echo '---> - You may delete them with "pw groupdel %%GROUP%%; pw userdel %%USER%%".'
+
;;
esac
diff --git a/mail/mailman/pkg-install b/mail/mailman/pkg-install
index 214bf3df6499..fc2dd3e53bc7 100644
--- a/mail/mailman/pkg-install
+++ b/mail/mailman/pkg-install
@@ -49,8 +49,22 @@ PRE-INSTALL)
POST-INSTALL)
echo "---> Starting post-install script:"
- echo "---> Creating crontab(5) file for user \"%%USER%%\""
- /usr/bin/crontab -u "%%USER%%" "%%MAILMANDIR%%/cron/crontab.in" || exit 1
+ echo "---> Checking crontab(5) file for user \"%%USER%%\""
+
+ if /usr/bin/crontab -u "%%USER%%" -l >/tmp/mmctab$$ 2>&1 ; then
+ if test -s /tmp/mmctab$$; then
+ echo "---> \"%%USER%%\" already has a crontab. Not overwriting it"
+ echo "---> Please merge any changes from the standard crontab file"
+ echo "---> %%MAILMANDIR%%/cron/crontab.in"
+ else
+ echo "---> Installing crontab(5) file for user \"%%USER%%\""
+ /usr/bin/crontab -u "%%USER%%" "%%MAILMANDIR%%/cron/crontab.in" || exit 1
+ fi
+ else
+ echo "---> Creating crontab(5) file for user \"%%USER%%\""
+ /usr/bin/crontab -u "%%USER%%" "%%MAILMANDIR%%/cron/crontab.in" || exit 1
+ fi
+ rm -f /tmp/mmctab$$
echo "---> Checking (and fixing) file and directory permissions"
%%MAILMANDIR%%/bin/check_perms -f >/dev/null 2>&1
='deletions'>-3/+24 * - Remove linux-mozillafirebird and it's language spinoffs. This port ispav2005-05-284-34/+0 * - Add german specific files to plistpav2005-05-271-0/+6 * - Update to 3.14pav2005-05-273-12/+80 * Unbreak: Fix plistvs2005-04-142-2/+3 * At Kris's request, back out the MACHINE_ARCH spelling correction untilobrien2005-04-121-1/+1 * Assist getting more ports working on AMD64 by obeying theobrien2005-04-111-1/+1 * Add two advisory variables that mark this port as a slave port. Due tolinimon2005-04-061-0/+3 * Update to KDE 3.4lofi2005-03-214-78/+534 * Bump PORTREVISION to chase the glib20 shared lib version change.marcus2005-03-122-0/+2 * Respect the user's USE_LINUX setting.trevor2005-03-025-5/+0 * BROKEN: Incomplete pkg-plistkris2005-02-281-0/+2 * Don't install man sub-directory 'debian'. It has less valuewosch2005-02-171-0/+1 * Fix the german/selfhtml port so that it installs thelofi2005-01-251-0/+2 * New port selfhtml version 80: Extensive german HTML referencelioux2005-01-214-0/+86 * Add SIZE in distinfohq2005-01-121-0/+1 * jDictionary plugin: English-German dictionaryhq2005-01-124-0/+24 * JDictionary plugin: German-Hungarian dictionaryhq2005-01-114-0/+23 * Fix build after one of the recent pthread-changesarved2005-01-101-2/+3 * Upgrade 1.2 -> 1.3.nectar2005-01-093-5/+8 * Add missing dependency (linux X11).netchild2005-01-042-2/+6 * Say hello to the linux mega patch, it consolidates our linux bits anetchild2005-01-015-8/+14 * Add i18nized doc subdirs to kdehier and adjust i18n port plists accordingly.lofi2004-12-235-5/+0 * Update to 1.0.0.p2 (pre2)vs2004-12-213-23/+14 * As previously announced, remove localized versions of Netscape whichlinimon2004-12-196-134/+0 * Fix kde3-i18n ports.lofi2004-12-162-4/+4 * Remove bogus spam I had in my cvs checkout and committed along with KDE.lofi2004-12-161-2/+0 * Update to KDE 3.3.2lofi2004-12-1413-18/+62 * Update to 4.13vs2004-12-133-7/+12 * Really build german versionvs2004-11-221-2/+2 * Fix missed path, remove USE_ZIP directive.mbr2004-11-221-2/+1 * Upgrade to staroffice 7 product update IV.mbr2004-11-222-9/+10 * Update to version 0.8markus2004-11-123-9/+15 * Update the English-language Netscape to 7.2. Add a security warningtrevor2004-11-091-0/+2 * Update to KDE 3.3.1lofi2004-11-0813-13/+130 * de-php_doc-de -> php_doc-deedwin2004-10-211-0/+1 * Update to KDE 3.3lofi2004-08-319-169/+301 * Factor out all but one of the build switches of the KDE main module portslofi2004-08-116-9/+9 * Apply a big libtool patch to allow porters to use the libtool installed bymarcus2004-07-101-1/+1 * Upgrade to Product Update 3.mbr2004-07-052-8/+9 * Establish a correct master-slave relationship betweenlinimon2004-06-241-1/+2 * - Remove empty files [1]pav2004-06-212-2/+1 * Update to version 3.2.3lofi2004-06-104-4/+84 * BROKEN: Unfetchablekris2004-06-091-0/+2 * - Fix MASTER_SITESkrion2004-06-081-2/+1 * Don't use Makefile.kde anymoremarkus2004-06-061-6/+3 * Upgrade to so-7-pp2 (product update 2)mbr2004-05-182-7/+8 * NO_LATEST_LINK=yesmbr2004-05-152-0/+2 * Oops. Forgot the language categories.lofi2004-05-076-9/+9 * Update to KDE 3.2.2lofi2004-04-204-40/+50 * Fix LATEST_LINK conflictsmaho2004-04-121-0/+1 * Chase the glib20 update, and bump all affected ports' PORTREVISIONs.marcus2004-04-052-2/+2 * Remove category pkg/COMMENT files in favour of a COMMENT variable in thekris2004-04-022-1/+2 * Update to 1.11: adds the possibility to change the font size in somelinimon2004-04-024-12/+13 * SIZEify (maintainer timeout)trevor2004-03-319-0/+22 * - Fix packagingpav2004-03-304-866/+60 * - SIZEifymarkus2004-03-291-0/+1 * Add SIZE.nectar2004-03-181-0/+1 * Add staroffice70kris2004-03-171-0/+1 * Whoa there, boy, that's a mighty big commit y'all have there...ade2004-03-141-1/+1 * Update to KDE 3.2.1 / QT 3.3.1lofi2004-03-109-4/+37 * - add SIZEdinoex2004-02-261-0/+1 * Change my email address.markus2004-02-241-1/+1 * BROKEN on 5.x: broken pkg-plistkris2004-02-091-1/+7 * Use PLIST_FILES (bento-tested, marcus-reviewed).trevor2004-02-062-1/+1 * Update to KDE 3.2.0lofi2004-02-0515-202/+1063 * Bump PORTREVISION on all ports that depend on gettext to aid with upgrading.marcus2004-02-043-0/+3 * Add USE_GETTEXT and bump PORTREVISION.marcus2004-02-045-10/+10 * Now gettext 0.12.1 is gettext-old.trevor2004-01-245-5/+5 * - fix PKGORIGINeik2004-01-231-1/+1 * - Update to 3.13pav2004-01-215-102/+334 * Fix Makefile comment in port.mbr2004-01-091-2/+2 * Add german port of staroffice7.0mbr2004-01-098-3680/+5317 * uncomment test lines. apologies.edwin2004-01-031-2/+2 * [NEW PORT] german/de-geonext: Interactive (dynamic) elementary Geometry Softwareedwin2004-01-035-0/+83 * - update to 0.95dinoex2003-12-292-2/+2 * Define USE_PERL5_BUILD, not erroneous USE_PERL.trevor2003-11-202-2/+2 * Define USE_PERL to make Perl available for (mostly deprecated)trevor2003-11-202-0/+2 * new German-language, i386 Linux binary port of Firebird Web browsertrevor2003-11-194-0/+26 * Fix COMMENT spellingeik2003-11-152-2/+2 * Fix COMMENT with an a-umlaut.nork2003-11-142-2/+2 * Add kheisereg, utility to search offline within the article databasearved2003-11-145-0/+85 * Use the FIND and XARGS macros introduced in bsd.port.mk 1.391.trevor2003-11-131-1/+1 * OpenOffice -> OpenOffice.orgmaho2003-11-094-4/+4 * Language setting was wrong for german.maho2003-11-091-1/+1 * Add OpenOffice.org 1.1 for german.maho2003-11-093-0/+117 * Forgot to change Makefile s..maho2003-11-081-1/+1 * rename openoffice* to openoffice-1.0* accodingly (repo copy).maho2003-11-082-2/+2 * rename openoffice to openoffice-1.0 after repocopymaho2003-11-083-117/+1 * Per maintainer request, remove german/cheapcall. The mastersite haslinimon2003-11-035-56/+0 * Update German Linux manual pages to version 0.4wosch2003-10-292-8/+8 * Per distfile survey, chase new mastersite. Informed maintainer.linimon2003-10-293-4/+3 * utilize SITE_PERLijliao2003-10-241-1/+1 * Switch to tk84, bump PORTREVISION and tidy some whitespace.kris2003-10-191-8/+9 * update german/linux-eagle: 4.09r2 -> 4.11daichi2003-10-143-11/+42 * - use DOCSDIRdinoex2003-10-121-22/+22 * Translation update: fix checksum.will2003-09-222-2/+2 * Upgrade to Qt 3.2.1 / KDE 3.1.4. See x11/kde3/Makefile rev 1.64 for details.will2003-09-182-2/+2 * Update KDE to the latest official release, KDE 3.1.3lofi2003-07-294-10/+28 * Upgrade to use new patchset 112887-04.tarmbr2003-07-242-6/+6