summaryrefslogtreecommitdiff
path: root/security/amavisd/files/patch-amavis-av-clamavd
blob: 6419b3745dbb3e6ce9aa3aa320652bd29c6ba17a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- amavis/av/clamavd.orig	Tue Feb 25 11:42:54 2003
+++ 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(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$/) {