From 2b4c64de0e432ca004c0632e858fb7ff138c01b4 Mon Sep 17 00:00:00 2001 From: SJ Date: Thu, 26 Jan 2017 20:16:33 +0100 Subject: [PATCH] antivirus fixes Change-Id: If5d5caee19880ba121d7f1165a22f7e8b811e476 Signed-off-by: SJ --- src/clamd.c | 2 +- src/dirs.c | 4 ++++ src/piler.c | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/clamd.c b/src/clamd.c index 443561e0..a2dda47c 100644 --- a/src/clamd.c +++ b/src/clamd.c @@ -64,7 +64,7 @@ int clamd_scan(char *tmpfile, struct __config *cfg){ if(q){ *q = '\0'; p++; - syslog(LOG_PRIORITY, "VIRUS <%s> found in %s", p, tmpfile); + syslog(LOG_PRIORITY, "%s: VIRUS <%s> found, status=%s", tmpfile, p, S_STATUS_DISCARDED); } } diff --git a/src/dirs.c b/src/dirs.c index b83e8d96..56e0e6e6 100644 --- a/src/dirs.c +++ b/src/dirs.c @@ -48,7 +48,11 @@ void check_and_create_directories(struct __config *cfg, uid_t uid, gid_t gid){ for(i=0; inumber_of_worker_processes; i++){ snprintf(s, sizeof(s)-1, "%s/%d", cfg->workdir, i); + #ifdef HAVE_ANTIVIRUS + createdir(s, uid, gid, 0711); + #else createdir(s, uid, gid, 0700); + #endif } } diff --git a/src/piler.c b/src/piler.c index 5ac6f558..2d9dc0df 100644 --- a/src/piler.c +++ b/src/piler.c @@ -104,7 +104,6 @@ int process_email(char *filename, struct session_data *sdata, struct __data *dat #ifdef HAVE_ANTIVIRUS if(do_av_check(filename, cfg) == AVIR_VIRUS){ - syslog(LOG_PRIORITY, "%s: discarding: virus", filename); unlink(filename); return OK; }