#
# VirusBuster (Client + Daemon)
#

if ($vbengcl) {
    do_log(2,"Using $vbengcl");
    chop($output = `$vbengcl -f -log scandir $TEMPDIR/parts 2>&1`);
    $errval = retcode($?);
    do_log(2,$output);
    if ($errval == 0) {			# no errors, no viruses found
	$scanner_errors = 0;
    } elsif ($errval == 3) {		# no errors, viruses discovered
	$scanner_errors = 0;
	# HINT: for an infected file it returns always 3,
	# although the man-page tells me a different story ...
	# needs to be FIXED
	@virusname = ($output =~ /Virus found = (.*);/g);
	return 1;  # 'true' indicates virus found and stops further checking
    } else {
	do_log(0,"Virus scanner failure: $vbengcl (error code: $errval)");
    }
}
