head 1.4; access; symbols pkgsrc-2018Q4:1.3.0.50 pkgsrc-2018Q4-base:1.3 pkgsrc-2018Q3:1.3.0.48 pkgsrc-2018Q3-base:1.3 pkgsrc-2018Q2:1.3.0.46 pkgsrc-2018Q2-base:1.3 pkgsrc-2018Q1:1.3.0.44 pkgsrc-2018Q1-base:1.3 pkgsrc-2017Q4:1.3.0.42 pkgsrc-2017Q4-base:1.3 pkgsrc-2017Q3:1.3.0.40 pkgsrc-2017Q3-base:1.3 pkgsrc-2017Q2:1.3.0.36 pkgsrc-2017Q2-base:1.3 pkgsrc-2017Q1:1.3.0.34 pkgsrc-2017Q1-base:1.3 pkgsrc-2016Q4:1.3.0.32 pkgsrc-2016Q4-base:1.3 pkgsrc-2016Q3:1.3.0.30 pkgsrc-2016Q3-base:1.3 pkgsrc-2016Q2:1.3.0.28 pkgsrc-2016Q2-base:1.3 pkgsrc-2016Q1:1.3.0.26 pkgsrc-2016Q1-base:1.3 pkgsrc-2015Q4:1.3.0.24 pkgsrc-2015Q4-base:1.3 pkgsrc-2015Q3:1.3.0.22 pkgsrc-2015Q3-base:1.3 pkgsrc-2015Q2:1.3.0.20 pkgsrc-2015Q2-base:1.3 pkgsrc-2015Q1:1.3.0.18 pkgsrc-2015Q1-base:1.3 pkgsrc-2014Q4:1.3.0.16 pkgsrc-2014Q4-base:1.3 pkgsrc-2014Q3:1.3.0.14 pkgsrc-2014Q3-base:1.3 pkgsrc-2014Q2:1.3.0.12 pkgsrc-2014Q2-base:1.3 pkgsrc-2014Q1:1.3.0.10 pkgsrc-2014Q1-base:1.3 pkgsrc-2013Q4:1.3.0.8 pkgsrc-2013Q4-base:1.3 pkgsrc-2013Q3:1.3.0.6 pkgsrc-2013Q3-base:1.3 pkgsrc-2013Q2:1.3.0.4 pkgsrc-2013Q2-base:1.3 pkgsrc-2013Q1:1.3.0.2 pkgsrc-2013Q1-base:1.3 pkgsrc-2012Q4:1.2.0.22 pkgsrc-2012Q4-base:1.2 pkgsrc-2012Q3:1.2.0.20 pkgsrc-2012Q3-base:1.2 pkgsrc-2012Q2:1.2.0.18 pkgsrc-2012Q2-base:1.2 pkgsrc-2012Q1:1.2.0.16 pkgsrc-2012Q1-base:1.2 pkgsrc-2011Q4:1.2.0.14 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q3:1.2.0.12 pkgsrc-2011Q3-base:1.2 pkgsrc-2011Q2:1.2.0.10 pkgsrc-2011Q2-base:1.2 pkgsrc-2011Q1:1.2.0.8 pkgsrc-2011Q1-base:1.2 pkgsrc-2010Q4:1.2.0.6 pkgsrc-2010Q4-base:1.2 pkgsrc-2010Q3:1.2.0.4 pkgsrc-2010Q3-base:1.2 pkgsrc-2010Q2:1.2.0.2 pkgsrc-2010Q2-base:1.2 pkgsrc-2010Q1:1.1.1.1.0.6 pkgsrc-2010Q1-base:1.1.1.1 pkgsrc-2009Q4:1.1.1.1.0.4 pkgsrc-2009Q4-base:1.1.1.1 pkgsrc-2009Q3:1.1.1.1.0.2 pkgsrc-2009Q3-base:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.4 date 2019.03.03.15.20.17; author taca; state dead; branches; next 1.3; commitid KpyQTl9k8bKpPVdB; 1.3 date 2013.03.14.16.35.32; author taca; state Exp; branches; next 1.2; 1.2 date 2010.06.16.22.27.04; author taca; state Exp; branches; next 1.1; 1.1 date 2009.09.22.17.41.07; author taca; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2009.09.22.17.41.07; author taca; state Exp; branches; next ; desc @@ 1.4 log @security/f-prot-antivirus6-ms-bin: remove package Remove f-prot-antivirus6-ms-bin package version 6.2.3. Althoguth F-PROT Antivirus is still supported for licensed users, its antivirus engine (i.e. program itself) did not updated since 2013 and it is sold for Linux and Windows (no *BSD). So it's time to remove it from pkgsrc. @ text @$NetBSD: patch-aa,v 1.3 2013/03/14 16:35:32 taca Exp $ --- mailtools/scan-mail.pl.orig 2012-12-12 08:12:57.000000000 +0000 +++ mailtools/scan-mail.pl @@@@ -81,11 +81,6 @@@@ use strict; -# scan-mail.pl is in mailtools/scan-mail.pl, add mailtools/Anomy/bin -# to @@INC to find Anomy:: -use FindBin '$Bin'; -use lib "$Bin/../perl/lib"; - use Socket; use Anomy::Sanitizer (); use Anomy::Sanitizer::FProt::Client (); @@@@ -130,7 +125,7 @@@@ my @@CONFIG_HARD = ( my %CONFIG_SOFT = ( # unknown=='check next rule' - SCANMAIL_SCANLIST => ['file_list_1=.*','file_list_1_policy=unknown:unknown:drop:drop', 'file_list_1_scanner = 0:1:2:builtin/fpscand %FILENAME'], + SCANMAIL_SCANLIST => ['file_list_1=.*','file_list_1_policy=unknown:unknown:drop:unknown', 'file_list_1_scanner = 0:1:2:builtin/fpscand %FILENAME'], SCANMAIL_BANLIST => ['file_list_2 =','file_list_2_policy=drop', 'file_list_2_scanner=0'], SCANMAIL_STOPLIST => ['file_list_3 =','file_list_3_policy=save', 'file_list_3_scanner=0'] ); @@@@ -217,6 +212,7 @@@@ if (my $val = $conf->{SCANMAIL_LOGLEVEL} # script, this is fugly # +my $datadir = "@@VARDIR@@"; my $debug = 0; my $verbose = 0; my $quarantine = 0; @@@@ -226,7 +222,7 @@@@ my $milter_cf = '/etc/mail/sendmai my $milter_conn = undef; my $milter_name = 'fp-milter'; my $milter_pid = undef; -my $fprot_milter = "$Bin/../mailtools/fp-milter"; +my $fprot_milter = "@@FPROTDIR@@/fp-milter"; my $postfix = 0; my $postfix_ret = undef; my $server = 0; @@@@ -235,7 +231,8 @@@@ my $proxy = 0; my $proxy_addr = '0.0.0.0:25'; my $smtp_addr = '127.0.0.1:26'; my $backup = 0; -my $backup_location = "$Bin/../backup/"; +my $backup_location = "$datadir/backup/"; +my $pid_file = "$datadir/run/scan-mail.pid"; # use this for really complex configuration of # scan-mail. /etc/f-prot.conf should take care of the simple things @@@@ -467,9 +464,10 @@@@ if ($daemon) defined(my $pid = fork) or die "Can't fork: $!"; exit if $pid; setsid or die "Can't start a new session: $!"; - open PID_FILE, '>/var/run/scan-mail.pid' or die "Can't open pid file: $!"; - print PID_FILE $$; + open PID_FILE, ">$pid_file" or die "Can't open pid file: $!"; + print PID_FILE "$$\n"; close PID_FILE; + $SIG{'TERM'} = $SIG{'HUP'} = \&clean_up; open STDERR, '>&STDOUT' or die "Can't dup stdout: $!"; } @@@@ -628,6 +626,12 @@@@ else ##[ Subroutines ]############################################################## +sub clean_up +{ + unlink($pid_file); + exit(0); +} + # proxy address, smtp address sub run_smtp_proxy { @@@@ -1058,7 +1062,7 @@@@ sub do_scan unless(-d $pathto) { - unless (mkdir($pathto,1777) or $!{'EEXIST'}) + unless (mkdir($pathto,1777) or $!{'EEXIST'}) { my $err = "Unable to create backup subdir $pathto: $!"; syslog err => $err; @ 1.3 log @Update F-PROT Antivirus packages to 6.2.3. F-PROT Antivirus for Unix, version 6.2.3 * Fixed a problem with multiple connections in fpscand. * Startup scripts have been tuned and improved. * fpscand now overrides the loglevel when run in foreground mode, forces it to 7 (DEBUG). * scan-mail.pl had trouble with multiple instances and temporary file cleanup, this had been fixed. * The installer now has the wrapper script option for fpscan as default. @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.2 2010/06/16 22:27:04 taca Exp $ @ 1.2 log @Update F-PROT Antivirus to 6.0.3.1. pkgsrc changes: * Fix PKGNAME to really intended to. * Some permission problem with using scan-mail.pl 6.0.3 (Initially NetBSD only): - Scanning inside NSIS (Nullsoft) installer files - Generic IFRAME exploit detection - Numerous additions to the Eldorado heuristic engine, making it significantly more powerful than before - Scanning of 7-Zip, ACE and "solid RAR" archives - Improved scanning of JavaScript files - List of detected malware now includes Eldorado heuristic detections - Much faster initial loading of ANTIVIR.DEF - Scan engine updated @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.1.1.1 2009/09/22 17:41:07 taca Exp $ d3 1 a3 1 --- mailtools/scan-mail.pl.orig 2010-04-12 14:18:39.000000000 +0000 d26 1 a26 1 @@@@ -201,6 +196,7 @@@@ if (my $val = $conf->{SCANMAIL_LOGLEVEL} d34 1 a34 1 @@@@ -210,7 +206,7 @@@@ my $milter_cf = '/etc/mail/sendmai d43 1 a43 1 @@@@ -219,7 +215,8 @@@@ my $proxy = 0; d53 1 a53 1 @@@@ -441,9 +438,11 @@@@ if ($daemon) d58 1 a60 1 print PID_FILE $$; d66 1 a66 1 @@@@ -602,6 +601,12 @@@@ else d79 1 a79 10 @@@@ -1020,7 +1025,7 @@@@ sub do_scan my $subdir = "/".$m.$d."/"; unless (-d $backup_location) { - unless (mkdir($backup_location,1777)) + unless (mkdir($backup_location,1777) or $!{'EEXIST'}) { my $err = "Unable to create backup basedir $backup_location: $!"; syslog err => $err; @@@@ -1032,7 +1037,7 @@@@ sub do_scan d83 1 a83 1 - unless (mkdir($pathto,1777)) a87 18 @@@@ -1080,7 +1085,16 @@@@ sub do_scan } # Try to delete the directory. Will fail unless it's empty. - rmdir($pathto); + # rmdir($pathto); + # + # But it cause some race, keep the directory and remove it by + # another script using find command or execute same functionality + # in this script. + # + # #!/bin/sh + # cd $backup_location + # find . -type d -name '[0-1]*' -mtime +7 rmdir {} \; >/dev/null 2>&1 + # } else { @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 --- mailtools/scan-mail.pl.orig 2008-01-19 23:53:47.000000000 +0900 d49 1 a49 1 +my $pid_file = "$datadir/scan-mail.pid"; d53 1 a53 10 @@@@ -239,7 +236,7 @@@@ if (my $val = $conf->{SCANMAIL_DROP_MALW # The temporary dir to use for files that are scanned and tmp data # produced elsewhere (via tmpfile) in the program my $TMPDIR = do { - my $tmp = '/tmp'; # default + my $tmp = '/var/tmp'; # default if ($ENV{TMPDIR} and $ENV{TMPDIR} ne $tmp) { $tmp = $ENV{TMPDIR}; @@@@ -441,9 +438,10 @@@@ if ($daemon) a57 1 - print PID_FILE $$; d60 1 d66 1 a66 1 @@@@ -602,6 +600,12 @@@@ else d79 1 a79 1 @@@@ -1020,7 +1024,7 @@@@ sub do_scan d88 1 a88 1 @@@@ -1032,7 +1036,7 @@@@ sub do_scan d97 1 a97 1 @@@@ -1080,7 +1084,16 @@@@ sub do_scan d102 1 a102 1 + # rmdir($pathto); @ 1.1.1.1 log @Importing F-PROT Antivirus for mailservers. F-PROT Antivirus is commercial product of FRISK Software International Inc. @ text @@