#
# CyberSoft VFind
#

if ($vfind) {
    do_log(2,"Using $vfind");
    chop($output = `$vfind -vexit $TEMPDIR/parts/*`);
    $errval = retcode($?);
    do_log(2,$output);
    if ($errval == 0) {			# no errors, no viruses found
	$scanner_errors = 0;
    } elsif ($errval == 23) {		# no errors, viruses discovered
	$scanner_errors = 0;
	@virusname = ($output =~ /##==>>>> VIRUS ID: CVDL (.+)/g);
	return 1;  # 'true' indicates virus found and stops further checking
    } else {
	do_log(0,"Virus scanner failure: $vfind (error code: $errval)");
    }
}
