#
# Command AntiVirus for Linux
#

if ($csav) {
    do_log(2,"Using $csav");
    chop($output = `$csav -all -archive -packed $TEMPDIR/parts`);
    $errval = retcode($?);
    do_log(2,$output);
    if ($errval == 50) {			# no errors, no viruses found
	$scanner_errors = 0;
    } elsif ($errval >= 51 || $errval <= 53) {	# no errors, viruses discovered
	$scanner_errors = 0;
	@virusname = ($output =~ /Infection: (.+)/g);
	return 1;  # 'true' indicates virus found and stops further checking
    } else {
	do_log(0,"Virus scanner failure: $csav (error code: $errval)");
    }
}
