]> git.proxmox.com Git - pmg-api.git/commitdiff
avast: change 'scan' invocation
authorStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 17 May 2019 12:45:45 +0000 (14:45 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 1 Jul 2019 15:51:09 +0000 (17:51 +0200)
Change the invocation of avast's 'scan' executable from a hardcoded '/bin/scan'
to 'scan', so that it checks for the executable in the PATH.

The hardcoded path became apparent, while testing the new upstream release
of avast (3.0.1), where 'scan' got moved from '/bin/scan' to '/usr/bin/scan'

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
PMG/Utils.pm

index 473a88fc7fae67dc22979c4e50dda66c9a239a6a..a33ea90ca2950dbc63c69c3474db6db8dda614f8 100644 (file)
@@ -459,7 +459,7 @@ sub analyze_virus_avast {
                "virus analyze (avast) failed: ERROR";
        };
 
-       open(my $cmd, '-|', '/bin/scan', $dname) ||
+       open(my $cmd, '-|', 'scan', $dname) ||
            die "$queue->{logid}: can't exec avast scan: $! : ERROR";
 
        my $response = '';