Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jan 2010 22:58:22 GMT
From:      Mike Jakubik <mike.jakubik@intertainservices.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/143277: [patch] Upgrade mail/mailscanner to 4.79.10
Message-ID:  <201001262258.o0QMwMtR082456@www.freebsd.org>
Resent-Message-ID: <201001262300.o0QN03pA056426@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         143277
>Category:       ports
>Synopsis:       [patch] Upgrade mail/mailscanner to 4.79.10
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 26 23:00:03 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Mike Jakubik
>Release:        8.0-STABLE
>Organization:
>Environment:
>Description:
This patch updates MS to the latest version, it also introduces an option to run it with taint mode on or off.

MS should ideally be ran with taint mode set to on, however there may still be some lingering taint mode bugs in the software, if this is the case the admin can choose to temporarily disable taint mode while the software gets fixed.

Thanks.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -urN mailscanner.orig/Makefile mailscanner/Makefile
--- mailscanner.orig/Makefile	2010-01-18 00:35:35.000000000 -0500
+++ mailscanner/Makefile	2010-01-26 16:52:24.000000000 -0500
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	MailScanner
-PORTVERSION=	4.79.5
+PORTVERSION=	4.79.10
 CATEGORIES=	mail
 MASTER_SITES=	http://www.mailscanner.info/files/4/tar/
 DISTNAME=	${PORTNAME}-install-${PORTVERSION}-${PATCHLEVEL}
diff -urN mailscanner.orig/distinfo mailscanner/distinfo
--- mailscanner.orig/distinfo	2010-01-18 00:35:35.000000000 -0500
+++ mailscanner/distinfo	2010-01-26 16:52:24.000000000 -0500
@@ -1,3 +1,3 @@
-MD5 (MailScanner-install-4.79.5-1.tar.gz) = dfd238bd6c59176f097842b403b28f2a
-SHA256 (MailScanner-install-4.79.5-1.tar.gz) = 9acac2a01c8116f41c3ed5d817acdd4dcb6abfa1b0b9f7c8ef55d029f3d3eae1
-SIZE (MailScanner-install-4.79.5-1.tar.gz) = 9139558
+MD5 (MailScanner-install-4.79.10-1.tar.gz) = 85aada093503e1b8f4b3350f46aa4ad7
+SHA256 (MailScanner-install-4.79.10-1.tar.gz) = bb7715d3d2d73b5f33849f6c9addf3480d7c6f345d70065cf80dfd663fbe8645
+SIZE (MailScanner-install-4.79.10-1.tar.gz) = 9116976
diff -urN mailscanner.orig/files/mailscanner.in mailscanner/files/mailscanner.in
--- mailscanner.orig/files/mailscanner.in	2010-01-09 18:45:02.000000000 -0500
+++ mailscanner/files/mailscanner.in	2010-01-26 16:52:24.000000000 -0500
@@ -10,7 +10,7 @@
 #                                 Set it to "YES" to enable mailscanner
 # mailscanner_configfile (path):  Set to "%%PREFIX%%/etc/MailScanner/MailScanner.conf" by default.
 # mailscanner_pidfile (path):     Set to "/var/run/MailScanner.pid" by default.
-# mailscanner_user (str):         Set to "root" by default. If you changed the "Run As User" variable in MailScanner.conf you MUST also set the same value here.
+# mailscanner_user (str):         Set to "root" by default. If you changed the "Run As User" variable in MailScanner.conf and wish to disable taint mode, you MUST also set the same value here.
 #
 
 . %%RC_SUBR%%
@@ -23,7 +23,6 @@
 : ${mailscanner_enable="NO"}
 : ${mailscanner_configfile="%%PREFIX%%/etc/MailScanner/MailScanner.conf"}
 : ${mailscanner_pidfile="/var/run/MailScanner.pid"}
-: ${mailscanner_user="root"}
 
 command="%%PREFIX%%/sbin/mailscanner"
 pidfile=${mailscanner_pidfile}
@@ -32,9 +31,6 @@
 
 required_files="${mailscanner_configfile}"
 
-start_precmd=pid_touch
-start_cmd="mailscanner_start"
-
 pid_touch ()
 {
 	touch $mailscanner_pidfile
@@ -45,5 +41,10 @@
 	su -m ${mailscanner_user} -c "exec ${command} ${command_args}"
 }
 
+if [ -n "${mailscanner_user}" ]; then
+	start_cmd="mailscanner_start"
+	start_precmd="pid_touch"
+fi
+
 run_rc_command "$1"
 
diff -urN mailscanner.orig/files/pkg-message.in mailscanner/files/pkg-message.in
--- mailscanner.orig/files/pkg-message.in	2010-01-09 18:45:02.000000000 -0500
+++ mailscanner/files/pkg-message.in	2010-01-26 16:52:24.000000000 -0500
@@ -39,15 +39,24 @@
 	script %%PREFIX%%/share/doc/MailScanner/Sophos.install.freebsd
 
 	*****************************************************************
-	A new rc variable called mailscanner_user has been added to the
-	startup script. This is a temporary workaround to address the
-	numerous taint mode problems that are still present in the code.
+	A new optional rc variable called mailscanner_user has been added
+	to the startup script. This is a temporary workaround to address
+	any possible taint mode problems that may still be present in the
+	code.
+	
+	Taint mode related problems can usually be identified from
+	undeliverable reports containing the following error:
+	
+	"MailScanner: Message attempted to kill MailScanner"
 
 	If you changed the "Run As User" variable in MailScanner.conf
-	you MUST also set the same value in /etc/rc.conf.
+	and wish to disable taint mode, you MUST also set the same value
+	in /etc/rc.conf.
 
 	i.e. mailscanner_user="postfix"
 
+	To re-enable taint mode, simply remove the variable from rc.conf.
+	
 	The new variable uses su to start the master perl script as the
 	specified user, this effectively disables perl's taint mode.
 	*****************************************************************


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001262258.o0QMwMtR082456>