Better virusscanner check
This commit is contained in:
parent
0a67e85966
commit
f7329deb21
@ -9,6 +9,13 @@ v0.91.2 14-Jan-2007
|
||||
mbselib:
|
||||
Fixed commandline address parsing if a 2d address was given.
|
||||
|
||||
mbfido:
|
||||
Check if active marked virusscanner is really present on the
|
||||
system.
|
||||
|
||||
mbsebbs:
|
||||
Check if active marked virusscanner is really present on the
|
||||
system.
|
||||
|
||||
|
||||
v0.91.1 22-Dec-2006
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Purpose ...............: Scan for virusses
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2005
|
||||
* Copyright (C) 1997-2007
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -62,8 +62,13 @@ int VirScan(char *path)
|
||||
fread(&virscanhdr, sizeof(virscanhdr), 1, fp);
|
||||
|
||||
while (fread(&virscan, virscanhdr.recsize, 1, fp) == 1) {
|
||||
if (virscan.available)
|
||||
if (virscan.available) {
|
||||
if (file_exist(virscan.scanner, X_OK)) {
|
||||
has_scan = TRUE;
|
||||
} else {
|
||||
Syslog('+', "Warning: virusscanner %s marked active but not present", virscan.comment);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!has_scan) {
|
||||
Syslog('+', "No active virus scanners, skipping scan");
|
||||
@ -85,7 +90,7 @@ int VirScan(char *path)
|
||||
|
||||
fseek(fp, virscanhdr.hdrsize, SEEK_SET);
|
||||
while (fread(&virscan, virscanhdr.recsize, 1, fp) == 1) {
|
||||
if (virscan.available) {
|
||||
if (virscan.available && file_exist(virscan.scanner, X_OK)) {
|
||||
Altime(3600);
|
||||
vrc = execute_str(virscan.scanner, virscan.options, (char *)NULL, (char *)"/dev/null", stdlog, errlog);
|
||||
if (file_size(stdlog)) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Purpose ...............: All the file sub functions.
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2005
|
||||
* Copyright (C) 1997-2007
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -479,7 +479,7 @@ int ScanDirect(char *fn)
|
||||
|
||||
while (fread(&virscan, virscanhdr.recsize, 1, fp) == 1) {
|
||||
|
||||
if (virscan.available) {
|
||||
if (virscan.available && file_exist(virscan.scanner, X_OK)) {
|
||||
/* 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) {
|
||||
if (virscan.available && file_exist(virscan.scanner, X_OK)) {
|
||||
/* Scanning */ /* with */
|
||||
snprintf(msg, 81, "%s %s %s %s ", (char *) Language(132), fn, (char *) Language(133), virscan.comment);
|
||||
pout(CFG.TextColourF, CFG.TextColourB, msg);
|
||||
|
Reference in New Issue
Block a user