aboutsummaryrefslogtreecommitdiffstats
path: root/config/havp/havp.inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-12-30 11:35:26 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-12-30 11:35:26 -0200
commitecdec6fac1f5fb34b458ab02ae3804f831840041 (patch)
treeb33f89f7c24e9cfaeacfbec9908b9cffdece7590 /config/havp/havp.inc
parent28c552b11ab71035755720ff2a6092f45b961439 (diff)
parent96e9c8b943230eb5c7668ebac627fbb328fe42f9 (diff)
downloadpfsense-packages-ecdec6fac1f5fb34b458ab02ae3804f831840041.tar.gz
pfsense-packages-ecdec6fac1f5fb34b458ab02ae3804f831840041.tar.bz2
pfsense-packages-ecdec6fac1f5fb34b458ab02ae3804f831840041.zip
Merge pull request #760 from SunStroke74/patch-1
Diffstat (limited to 'config/havp/havp.inc')
-rw-r--r--config/havp/havp.inc13
1 files changed, 8 insertions, 5 deletions
diff --git a/config/havp/havp.inc b/config/havp/havp.inc
index 08937a2f..8118f695 100644
--- a/config/havp/havp.inc
+++ b/config/havp/havp.inc
@@ -48,7 +48,7 @@ if(!function_exists("filter_configure"))
define('HV_DEBUG', 'false');
# use Clamd daemon (another - use libclam)
-define('HV_USE_CLAMD', 'true');
+# define('HV_USE_CLAMD', 'true');
define('HV_CLAMD_TCPSOCKET', 'true');
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -151,6 +151,7 @@ define('HV_SCANTEMPFILE', 'hv_scan_tempfile');
# XML fields
# ------------------------------------------------------------------------------
define('F_ENABLE', 'enable');
+define('F_USECLAMD', 'useclamd');
define('F_PROXYMODE', 'proxymode');
define('F_PROXYINTERFACE', 'proxyinterface');
define('F_PROXYBINDIFACE', 'proxybindiface'); # internal var
@@ -515,6 +516,8 @@ function havp_convert_pfxml_xml()
# === GUI Fields ===
$havp_config[F_ENABLE] = ( $pfconf[F_ENABLE] === 'on' ? 'true' : 'false' );
+ # ClamAV mode
+ $havp_config[F_USECLAMD] = $pfconf[F_USECLAMD];
# proxy
$havp_config[F_PROXYMODE] = ( !empty($pfconf[F_PROXYMODE]) ? $pfconf[F_PROXYMODE] : 'standard' );
# ToDo: add check squid transparent
@@ -710,9 +713,9 @@ function havp_config_havp()
$conf[] = "MAXDOWNLOADSIZE {$havp_config[F_MAXDOWNLOADSIZE]}";
#
$conf[] = "\n# ClamAV Library Scanner (libclamav) ";
- $conf[] = "ENABLECLAMLIB " . (HV_USE_CLAMD !== 'true' ? "true" : "false");
+ $conf[] = "ENABLECLAMLIB " . ($havp_config[F_USECLAMD] !== 'true' ? "true" : "false");
# use clamd, if configured
- if (HV_USE_CLAMD === 'true') {
+ if ($havp_config[F_USECLAMD] === 'true') {
$conf[] = "\n# Clamd scanner (Clam daemon)";
$conf[] = "ENABLECLAMD true";
# clamd socket
@@ -1342,7 +1345,7 @@ function havp_startup_script()
$s[] = "\t# start";
$s[] = "\tif [ -z \"`{$havpchk}`\" ];then";
- if (HV_USE_CLAMD === 'true') {
+ if ($havp_config[F_USECLAMD] === 'true') {
$clampid_dir = HVDEF_CLAM_RUNDIR;
$s[] = "\t\t# start clamd before (to be sure)";
$s[] = "\t\t" . HVDEF_CLAM_STARTUP_SCRIPT . " start";
@@ -1563,7 +1566,7 @@ function start_antivirus_scanner($filename)
$param[] = "--max-dir-recursion=255"; # Maximum directory recursion level
$param = implode(" ", $param);
- if (HV_USE_CLAMD === 'true')
+ if ($havp_config[F_USECLAMD] === 'true')
$param = "clamdscan $param $filename"; # use clamd daemon (more quickly)
else $param = "clamscan $param $filename";