From db1e88600fb5c87cb0111fbb0259da484f9a02a5 Mon Sep 17 00:00:00 2001 From: Pav Lucistnik Date: Sun, 6 Jun 2004 23:18:36 +0000 Subject: - Really fix connection to clamd - Actually use result returned by clamd PR: ports/67621 Submitted by: Yoshisato YANAGISAWA --- security/amavisd/files/patch-amavis-av-clamavd | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'security/amavisd') diff --git a/security/amavisd/files/patch-amavis-av-clamavd b/security/amavisd/files/patch-amavis-av-clamavd index 1832e3aa9ace..6419b3745dbb 100644 --- a/security/amavisd/files/patch-amavis-av-clamavd +++ b/security/amavisd/files/patch-amavis-av-clamavd @@ -1,11 +1,20 @@ --- amavis/av/clamavd.orig Tue Feb 25 11:42:54 2003 -+++ amavis/av/clamavd Sun May 30 13:26:34 2004 ++++ amavis/av/clamavd Mon Jun 7 01:16:46 2004 @@ -5,7 +5,7 @@ if ($clamd) { do_log(2,"Using clamd"); - my $sock = IO::Socket::INET->new('127.0.0.1:3310'); -+ my $sock = IO::Socket::UNIX->new('/var/run/clamav/clamd'); ++ my $sock = IO::Socket::UNIX->new(Peer => '/var/run/clamav/clamd'); if (defined $sock) { $sock->print("SCAN $TEMPDIR/parts\n"); $sock->flush; +@@ -15,7 +15,7 @@ + if ($output =~ /FOUND$/) { # no errors, a virus was found + $scanner_errors = 0; + @virusname = ($output =~ /: (.+) FOUND/g); +- return 1; # 'true' indicates virus found and stops further checking ++ do_virus($output); + } elsif ($output =~ /OK$/) { # no errors, no viruses + $scanner_errors = 0; + } elsif ($output =~ /ERROR$/) { -- cgit v1.2.3