Better virusscan checks

This commit is contained in:
Michiel Broek 2007-02-03 13:12:20 +00:00
parent f7329deb21
commit 525f364aa7
2 changed files with 4 additions and 4 deletions

View File

@ -63,7 +63,7 @@ int VirScan(char *path)
while (fread(&virscan, virscanhdr.recsize, 1, fp) == 1) {
if (virscan.available) {
if (file_exist(virscan.scanner, X_OK)) {
if (file_exist(virscan.scanner, X_OK) == 0) {
has_scan = TRUE;
} else {
Syslog('+', "Warning: virusscanner %s marked active but not present", virscan.comment);
@ -90,7 +90,7 @@ int VirScan(char *path)
fseek(fp, virscanhdr.hdrsize, SEEK_SET);
while (fread(&virscan, virscanhdr.recsize, 1, fp) == 1) {
if (virscan.available && file_exist(virscan.scanner, X_OK)) {
if (virscan.available && (file_exist(virscan.scanner, X_OK) ==0)) {
Altime(3600);
vrc = execute_str(virscan.scanner, virscan.options, (char *)NULL, (char *)"/dev/null", stdlog, errlog);
if (file_size(stdlog)) {

View File

@ -479,7 +479,7 @@ int ScanDirect(char *fn)
while (fread(&virscan, virscanhdr.recsize, 1, fp) == 1) {
if (virscan.available && file_exist(virscan.scanner, X_OK)) {
if (virscan.available && (file_exist(virscan.scanner, X_OK) == 0)) {
/* Scanning */ /* with */
snprintf(msg, 81, "%s %s %s %s ", (char *) Language(132), fn, (char *) Language(133), virscan.comment);
pout(CFG.TextColourF, CFG.TextColourB, msg);
@ -617,7 +617,7 @@ int ScanArchive(char *fn, char *ftype)
fread(&virscanhdr, sizeof(virscanhdr), 1, fp);
while (fread(&virscan, virscanhdr.recsize, 1, fp) == 1) {
if (virscan.available && file_exist(virscan.scanner, X_OK)) {
if (virscan.available && (file_exist(virscan.scanner, X_OK) == 0)) {
/* Scanning */ /* with */
snprintf(msg, 81, "%s %s %s %s ", (char *) Language(132), fn, (char *) Language(133), virscan.comment);
pout(CFG.TextColourF, CFG.TextColourB, msg);