Package: dansguardian Version: 2.10.1.1-5.1 Severity: important Tags: patch
Please add support for clamav 0.101.1. The attached patch adds this and has been lightly tested. Sebastian
#! /bin/sh /usr/share/dpatch/dpatch-run ## 90_clamav111_support.dpatch by Sebastian A. Siewior ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Adds support for clamav 0.101.1 @DPATCH@ diff --git a/src/contentscanners/clamav.cpp b/src/contentscanners/clamav.cpp index cb5e5be1b3fc..7af3c9383e60 100644 --- a/src/contentscanners/clamav.cpp +++ b/src/contentscanners/clamav.cpp @@ -172,7 +172,13 @@ int clamavinstance::scanMemory(HTTPHeader * requestheader, HTTPHeader * docheade } #ifdef CL_INIT_DEFAULT - rc = cl_scandesc(fd, &vn, NULL, engine, CL_SCAN_STDOPT); + struct cl_scan_options cl_options; + + memset(&cl_options, 0, sizeof(struct cl_scan_options)); + cl_options.general = CL_SCAN_GENERAL_ALLMATCHES; + cl_options.parse = ~0; + + rc = cl_scandesc(fd, NULL, &vn, NULL, engine, &cl_options); #else rc = cl_scandesc(fd, &vn, NULL, engine, &limits, CL_SCAN_STDOPT); #endif @@ -201,7 +207,13 @@ int clamavinstance::scanFile(HTTPHeader * requestheader, HTTPHeader * docheader, lastmessage = lastvirusname = ""; const char *vn = NULL; #ifdef CL_INIT_DEFAULT - int rc = cl_scanfile(filename, &vn, NULL, engine, CL_SCAN_STDOPT ); + struct cl_scan_options cl_options; + + memset(&cl_options, 0, sizeof(struct cl_scan_options)); + cl_options.general = CL_SCAN_GENERAL_ALLMATCHES; + cl_options.parse = ~0; + + int rc = cl_scanfile(filename, &vn, NULL, engine, &cl_options); #else int rc = cl_scanfile(filename, &vn, NULL, engine, &limits, CL_SCAN_STDOPT ); #endif -- 2.20.1