2011-11-14 15:57:52 +01:00
|
|
|
/*
|
|
|
|
* avir.c, SJ
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <piler.h>
|
|
|
|
|
|
|
|
|
2017-08-08 15:34:45 +02:00
|
|
|
int do_av_check(char *filename, struct config *cfg){
|
2011-11-14 15:57:52 +01:00
|
|
|
int rav = AVIR_OK;
|
|
|
|
|
2017-01-25 22:19:12 +01:00
|
|
|
if(clamd_scan(filename, cfg) == AV_VIRUS) rav = AVIR_VIRUS;
|
2011-11-14 15:57:52 +01:00
|
|
|
|
2017-01-25 22:19:12 +01:00
|
|
|
if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "%s: done virus scanning", filename);
|
2015-11-27 11:56:19 +01:00
|
|
|
|
2011-11-14 15:57:52 +01:00
|
|
|
return rav;
|
|
|
|
}
|