aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/squid/squid.inc2
-rwxr-xr-xconfig/squid3/33/squid.inc35
-rw-r--r--pkg_config.8.xml4
-rw-r--r--pkg_config.8.xml.amd644
4 files changed, 30 insertions, 15 deletions
diff --git a/config/squid/squid.inc b/config/squid/squid.inc
index bd0c8634..34186407 100644
--- a/config/squid/squid.inc
+++ b/config/squid/squid.inc
@@ -295,7 +295,7 @@ function squid_before_form_general($pkg) {
}
$field = &$pkg['fields']['field'][$i];
- for ($i = 0; $i < count($values) - 1; $i++)
+ for ($i = 0; $i < count($values); $i++)
$field['options']['option'][] = array('name' => $names[$i], 'value' => $values[$i]);
}
diff --git a/config/squid3/33/squid.inc b/config/squid3/33/squid.inc
index 8eb9f2fa..a29fb3c6 100755
--- a/config/squid3/33/squid.inc
+++ b/config/squid3/33/squid.inc
@@ -427,6 +427,10 @@ function squid_validate_general($post, $input_errors) {
$input_errors[] = "You can not run squid on the same port as the webgui";
}
+ if (($post['ssl_proxy'] == 'on') && ( $post['dca'] == '')) {
+ $input_errors[] = "SSL interception cannot be enabled without a CA.";
+ }
+
foreach (array('defined_ip_proxy_off') as $hosts) {
foreach (explode(";", $post[$hosts]) as $host) {
$host = trim($host);
@@ -783,7 +787,7 @@ function squid_check_ca_hashes(){
#check certificates
$cert_count=0;
if (is_dir(SQUID_LOCALBASE. '/share/certs'))
- if ($handle = opendir(SQUID_LOCALBASE.'/usr/local/share/certs')) {
+ if ($handle = opendir(SQUID_LOCALBASE.'/share/certs')) {
while (false !== ($file = readdir($handle)))
if (preg_match ("/\d+.0/",$file))
$cert_count++;
@@ -1345,9 +1349,9 @@ EOF;
if (!file_exists(SQUID_LOCALBASE."/etc/c-icap/squidclamav.conf.sample"))
if (file_exists(SQUID_LOCALBASE."/etc/c-icap/squidclamav.conf.default")){
$sample_file=file_get_contents(SQUID_LOCALBASE."/etc/c-icap/squidclamav.conf.default");
- $matches[0]="@/var/run/clamav/clamd.ctl@";
- $replaces[0]="/var/run/clamav/clamd.sock";
- file_put_contents(SQUID_LOCALBASE."/etc/c-icap/squidclamav.conf.sample",preg_replace($matches,$replaces,$sample_file),LOCK_EX);
+ $clamav_m[0]="@/var/run/clamav/clamd.ctl@";
+ $clamav_r[0]="/var/run/clamav/clamd.sock";
+ file_put_contents(SQUID_LOCALBASE."/etc/c-icap/squidclamav.conf.sample",preg_replace($clamav_m,$clamav_r,$sample_file),LOCK_EX);
}
#c-icap.conf
if (!file_exists(SQUID_LOCALBASE."/etc/c-icap/c-icap.conf.sample"))
@@ -1355,8 +1359,6 @@ EOF;
$sample_file=file_get_contents(SQUID_LOCALBASE."/etc/c-icap/c-icap.conf.default");
if (! preg_match ("/squidclamav/"))
$sample_file.="\nService squidclamav squidclamav.so\n";
- if (! preg_match ("/User proxy/"))
- $sample_file.="\nUser proxy\n";
file_put_contents(SQUID_LOCALBASE."/etc/c-icap/c-icap.conf.sample",$sample_file,LOCK_EX);
}
@@ -1378,8 +1380,8 @@ EOF;
$antivirus_config = $config['installedpackages']['squidantivirus']['config'][0];
}
#check dirs
- $dirs=array("/var/run/c-icap" => "proxy",
- "/var/log/c-icap" => "proxy",
+ $dirs=array("/var/run/c-icap" => "clamav",
+ "/var/log/c-icap" => "clamav",
"/var/log/clamav" => "clamav",
"/var/run/clamav" => "clamav",
"/var/db/clamav" => "clamav");
@@ -1404,11 +1406,20 @@ EOF;
#check antivirus daemons
#check icap
- if (is_process_running("c-icap"))
- mwexec_bg("/usr/local/etc/rc.d/c-icap reload");
- else
+ if (is_process_running("c-icap")){
+ mwexec('/bin/echo -n "reconfigure" > /var/run/c-icap/c-icap.ctl');
+ }
+ else{
+ #check c-icap user on startup file
+ $c_icap_rcfile="/usr/local/etc/rc.d/c-icap";
+ if (file_exists($c_icap_rcfile)){
+ $sample_file=file_get_contents($c_icap_rcfile);
+ $cicapm[0]="@c_icap_user=.*}@";
+ $cicapr[0]='c_icap_user="clamav"}';
+ file_put_contents($c_icap_rcfile,preg_replace($cicapm,$cicapr,$sample_file),LOCK_EX);
+ }
mwexec("/usr/local/etc/rc.d/c-icap start");
-
+ }
#check clamav
if (is_process_running("clamd"))
mwexec_bg("/usr/local/etc/rc.d/clamav-clamd reload");
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index 48acfbb5..873bb238 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -1280,11 +1280,13 @@
<depends_on_package>squid-3.3.4.tbz</depends_on_package>
<depends_on_package>libltdl-2.4.2.tbz</depends_on_package>
<depends_on_package>libwww-5.4.0_4.tbz</depends_on_package>
+ <depends_on_package>squidclamav-6.10_1.tbz</depends_on_package>
+ <depends_on_package>clamav-0.97.8.tbz</depends_on_package>
<depends_on_package>ca_root_nss-3.14.1.tbz</depends_on_package>
<build_pbi>
<ports_before>www/libwww</ports_before>
<port>www/squid33</port>
- <ports_after>www/squid_radius_auth security/clamav www/squidclamav security/ca_root_nss</ports_after>
+ <ports_after>www/squid_radius_auth security/clamav www/squidclamav security/ca_root_nss www/c-icap-modules</ports_after>
</build_pbi>
<build_options>c-icap_UNSET=IPV6 squid33_UNSET=AUTH_SMB AUTH_SQL DNS_HELPER FS_COSS ESI SNMP ECAP STACKTRACES STRICT_HTTP TP_IPF TP_IPFW VIA_DB DEBUG DOCS EXAMPLES;squid33_SET=ARP_ACL AUTH_KERB AUTH_LDAP AUTH_NIS AUTH_SASL CACHE_DIGESTS DELAY_POOLS FOLLOW_XFF TP_PF MSSL_CRTD WCCP WCCPV2 FS_AUFS HTCP ICAP ICMP IDENT IPV6 KQUEUE LARGEFILE SSL SSL_CRTD</build_options>
<config_file>http://www.pfsense.org/packages/config/squid3/33/squid.xml</config_file>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 459581fa..7bcb254c 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -1267,11 +1267,13 @@
<depends_on_package>squid-3.3.4.tbz</depends_on_package>
<depends_on_package>libltdl-2.4.2.tbz</depends_on_package>
<depends_on_package>libwww-5.4.0_4.tbz</depends_on_package>
+ <depends_on_package>squidclamav-6.10_1.tbz</depends_on_package>
+ <depends_on_package>clamav-0.97.8.tbz</depends_on_package>
<depends_on_package>ca_root_nss-3.14.1.tbz</depends_on_package>
<build_pbi>
<ports_before>www/libwww</ports_before>
<port>www/squid33</port>
- <ports_after>www/squid_radius_auth security/clamav www/squidclamav security/ca_root_nss</ports_after>
+ <ports_after>www/squid_radius_auth security/clamav www/squidclamav security/ca_root_nss www/c-icap-modules</ports_after>
</build_pbi>
<build_options>c-icap_UNSET=IPV6 squid33_UNSET=AUTH_SMB AUTH_SQL DNS_HELPER FS_COSS ESI ECAP SNMP STACKTRACES STRICT_HTTP TP_IPF TP_IPFW VIA_DB DEBUG DOCS EXAMPLES;squid33_SET=ARP_ACL AUTH_KERB AUTH_LDAP AUTH_NIS AUTH_SASL CACHE_DIGESTS DELAY_POOLS FOLLOW_XFF TP_PF MSSL_CRTD WCCP WCCPV2 FS_AUFS HTCP ICAP ICMP IDENT IPV6 KQUEUE LARGEFILE SSL SSL_CRTD</build_options>
<config_file>http://www.pfsense.org/packages/config/squid3/33/squid.xml</config_file>