clamd related compile fix

Change-Id: I052b48c3f262cd9a7e7a56cd4ab6cf862a661ee6
Signed-off-by: SJ <sj@acts.hu>
This commit is contained in:
SJ 2017-01-25 10:35:58 +01:00
parent e8aac544cc
commit 3762b31e4b
2 changed files with 3 additions and 3 deletions

View File

@ -373,6 +373,7 @@ struct counters {
struct session_ctx { struct session_ctx {
char virusinfo[SMALLBUFSIZE];
char *status; char *status;
int new_sd; int new_sd;
int db_conn; int db_conn;

View File

@ -428,7 +428,7 @@ void process_written_file(struct session_ctx *sctx){
#ifdef HAVE_ANTIVIRUS #ifdef HAVE_ANTIVIRUS
if(sctx->cfg->use_antivirus == 1){ if(sctx->cfg->use_antivirus == 1){
sctx->sdata->rav = do_av_check(sctx->sdata, &virusinfo[0], sctx->data, sctx->cfg); sctx->sdata->rav = do_av_check(sctx->sdata, sctx->virusinfo, sctx->data, sctx->cfg);
} }
#endif #endif
@ -467,7 +467,6 @@ void process_written_file(struct session_ctx *sctx){
void process_data(struct session_ctx *sctx){ void process_data(struct session_ctx *sctx){
char *arule = NULL; char *arule = NULL;
char virusinfo[SMALLBUFSIZE];
sctx->inj = ERR; sctx->inj = ERR;
sctx->status = S_STATUS_UNDEF; sctx->status = S_STATUS_UNDEF;
@ -483,7 +482,7 @@ void process_data(struct session_ctx *sctx){
sctx->inj = OK; sctx->inj = OK;
} }
else if(AVIR_VIRUS == sctx->sdata->rav){ else if(AVIR_VIRUS == sctx->sdata->rav){
syslog(LOG_PRIORITY, "%s: found virus: %s", sctx->sdata->ttmpfile, virusinfo); syslog(LOG_PRIORITY, "%s: found virus: %s", sctx->sdata->ttmpfile, sctx->virusinfo);
sctx->counters->c_virus++; sctx->counters->c_virus++;
sctx->inj = OK; sctx->inj = OK;
} else if(strlen(sctx->sdata->bodydigest) < 10) { } else if(strlen(sctx->sdata->bodydigest) < 10) {