#
# F-Prot Antivirus/Linux
#

if ($fprot) {
    do_log(2,"Using $fprot");
    chop($output = `$fprot -DUMB -ARCHIVE $TEMPDIR/parts`);
    $errval = retcode($?);
    do_log(2,$output);
    if ($errval == 0 || $errval == 8) {		# no errors, no viruses found
	$scanner_errors = 0;
    } elsif ($errval == 3 || $errval == 6) {	# 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: $fprot (error code: $errval)");
    }
}
