Date: Mon, 16 Aug 2004 19:03:38 +0200 (CEST) From: Jan-Peter Koopmann <j.koopmann@seceidos.de> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/70550: [MAINTAINER] mail/MailScanner: Extra patch for better RAR support and new AntiVir Message-ID: <200408161703.i7GH3cD5080388@services.intern.seceidos.de> Resent-Message-ID: <200408161710.i7GHAV7H042216@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 70550 >Category: ports >Synopsis: [MAINTAINER] mail/MailScanner: Extra patch for better RAR support and new AntiVir >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Mon Aug 16 17:10:30 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Jan-Peter Koopmann >Release: FreeBSD 4.9-STABLE i386 >Organization: >Environment: System: FreeBSD services.intern.seceidos.de 4.9-STABLE FreeBSD 4.9-STABLE #0: Mon Jan 5 10:56:46 CET >Description: Julian Field published two patches: - better support for RAR scanning - Support for latest AntiVir Please add the following file to CVS: files/patch-lib:MailScanner:SweepViruses.pm Reason for priority: Some viruses were able to sneak through RAR archives. This should be fixed now. Thanks. Generated with FreeBSD Port Tools 0.50 >How-To-Repeat: >Fix: --- MailScanner-4.32.5_2.patch begins here --- diff -ruN --exclude=CVS /server-root/ports/mail/mailscanner.orig/Makefile /server-root/ports/mail/mailscanner/Makefile --- /server-root/ports/mail/mailscanner.orig/Makefile Thu Aug 12 14:47:59 2004 +++ /server-root/ports/mail/mailscanner/Makefile Mon Aug 16 18:57:29 2004 @@ -7,6 +7,7 @@ PORTNAME= MailScanner PORTVERSION= 4.32.5 +PORTREVISION= 2 CATEGORIES= mail MASTER_SITES= http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/tar/ DISTNAME= ${PORTNAME}-install-${PORTVERSION}-${PATCHLEVEL} diff -ruN --exclude=CVS /server-root/ports/mail/mailscanner.orig/files/patch-lib:MailScanner:SweepViruses.pm /server-root/ports/mail/mailscanner/files/patch-lib:MailScanner:SweepViruses.pm --- /server-root/ports/mail/mailscanner.orig/files/patch-lib:MailScanner:SweepViruses.pm Thu Jan 1 01:00:00 1970 +++ /server-root/ports/mail/mailscanner/files/patch-lib:MailScanner:SweepViruses.pm Mon Aug 16 18:58:42 2004 @@ -0,0 +1,44 @@ +--- ../MailScanner-install-4.32.5.orig/lib/MailScanner/SweepViruses.pm Mon Aug 16 18:57:47 2004 ++++ lib/MailScanner/SweepViruses.pm Mon Aug 16 18:58:17 2004 +@@ -2195,7 +2195,7 @@ + MailScanner::Log::InfoLog("ProcessClamAVOutput: %s", $1); + return 0; + } +- return 0 if /^ /; # " inflating", " deflating.." from --unzip ++ return 0 if /^ |^Extracting|module failure$/; # " inflating", " deflating.." from --unzip + if ($clamav_archive && /^$clamav_archive:/) + { + $clamav_archive = ""; +@@ -2206,6 +2206,22 @@ + + MailScanner::Log::InfoLog("%s", $line); + ++ #(Real infected archive: /var/spool/MailScanner/incoming/19746/./i75EFmSZ014248/eicar.rar) ++ if (/^\(Real infected archive: (.*)\)$/) ++ { ++ my ($file, $ReportStart); ++ $file = $1; ++ $file =~ s/^(.\/)?$BaseDir\/?//; ++ $file =~ s/^\.\///; ++ my ($id,$part) = split /\//, $file, 2; ++ ++ $ReportStart = $part; ++ $ReportStart = $Name . ': ' . $ReportStart if $Name; ++ $infections->{"$id"}{"$part"} .= "$ReportStart contains a virus\n"; ++ $types->{"$id"}{"$part"} .= "v"; ++ return 1; ++ } ++ + if (/^(\(raw\) )?(.*?): (.*) FOUND$/) + { + my ($file, $subfile, $virus, $report, $ReportStart); +@@ -2457,6 +2473,9 @@ + # Sample output: + #./1B978O-0000g2-Iq/eicar.com Virus identified EICAR_Test (+2) + #./1B978O-0000g2-Iq/eicar.zip:\eicar.com Virus identified EICAR_Test (+2) ++ ++ # Remove all the duff carriage-returns from the line ++ $line =~ s/[\r\n]//g; + + #print STDERR "Line: $line\n"; + return 0 unless $line =~ /Virus identified (.+)$/; --- MailScanner-4.32.5_2.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408161703.i7GH3cD5080388>