Added support for Clam Antivirus

This commit is contained in:
Michiel Broek
2004-04-11 12:36:02 +00:00
parent 5d7ef141c3
commit ac72e89386
7 changed files with 85 additions and 13 deletions

View File

@@ -100,9 +100,21 @@ int CountVirus(void)
sprintf(virscan.options, "--noboot --noexpire -r --secure -");
fwrite(&virscan, sizeof(virscan), 1, fil);
memset(&virscan, 0, sizeof(virscan));
sprintf(virscan.comment, "Clam AntiVirus");
if (strlen(_PATH_CLAMAV)) {
sprintf(virscan.scanner, "%s", _PATH_CLAMAV);
virscan.available = TRUE;
} else {
sprintf(virscan.scanner, "/usr/local/bin/clamscan");
virscan.available = FALSE;
}
sprintf(virscan.options, "--quiet --recursive");
fwrite(&virscan, sizeof(virscan), 1, fil);
fclose(fil);
chmod(ffile, 0640);
return 3;
return 4;
} else
return -1;
}