aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorMarcello Coutinho <marcellocoutinho@gmail.com>2012-07-09 11:42:43 -0300
committerMarcello Coutinho <marcellocoutinho@gmail.com>2012-07-09 11:42:43 -0300
commit27a37ac3ddcd0dc1a8a230841199fc8ba997195f (patch)
treed3aad1402e1c6baa41015c66731f7b8888ef057c /config
parent1891313532c369d836404ce68cc08a85cbe6e3f2 (diff)
downloadpfsense-packages-27a37ac3ddcd0dc1a8a230841199fc8ba997195f.tar.gz
pfsense-packages-27a37ac3ddcd0dc1a8a230841199fc8ba997195f.tar.bz2
pfsense-packages-27a37ac3ddcd0dc1a8a230841199fc8ba997195f.zip
dansguardian - include missing exceptioniplist field to gui
Diffstat (limited to 'config')
-rwxr-xr-xconfig/dansguardian/dansguardian.inc13
-rw-r--r--config/dansguardian/dansguardian_ips_header.xml16
2 files changed, 26 insertions, 3 deletions
diff --git a/config/dansguardian/dansguardian.inc b/config/dansguardian/dansguardian.inc
index 8a976ebf..0ef32a07 100755
--- a/config/dansguardian/dansguardian.inc
+++ b/config/dansguardian/dansguardian.inc
@@ -260,9 +260,9 @@ function sync_package_dansguardian() {
"/lists/contentscanners/exceptionvirusmimetypelist",
"/lists/contentscanners/exceptionvirussitelist",
"/lists/contentscanners/exceptionvirusurllist",
+ "/lists/exceptioniplist",
"/lists/pics");
-
$dansguardian_dir="/usr/local/etc/dansguardian";
foreach ($files as $file)
if (! file_exists($dansguardian_dir.$file.'.sample')){
@@ -671,7 +671,7 @@ function sync_package_dansguardian() {
if($dansguardian_antivirus['extension_list'] == "" && file_exists ($dansguardian_dir.'/lists/contentscanners/exceptionvirusextensionlist.sample')){
$config['installedpackages']['dansguardianantivirusacl']['config'][0]['extension_list']=base64_encode(file_get_contents($dansguardian_dir.'/lists/contentscanners/exceptionvirusextensionlist.sample'));
$load_samples++;
- }
+ }
file_put_contents($dansguardian_dir."/lists/contentscanners/exceptionvirusextensionlist",($dansguardian_antivirus['extension_enabled']?dg_text_area_decode($config['installedpackages']['dansguardianantivirusacl']['config'][0]['extension_list']):""),LOCK_EX);
#log report
@@ -682,6 +682,15 @@ function sync_package_dansguardian() {
$dansguardian_log['report_file']=base64_encode($report_file);
$load_samples++;
}
+ #exception ip list
+ #create a default setup if not exists
+ if (!is_array($config['installedpackages']['dansguardianips']['config']))
+ $config['installedpackages']['dansguardianips']['config'][0]=array();
+ if($config['installedpackages']['dansguardianips']['config'][0]['exceptioniplist']){
+ $config['installedpackages']['dansguardianips']['config'][0]['exceptioniplist']=base64_encode(file_get_contents($dansguardian_dir.'/lists/exceptioniplist.sample'));
+ $load_samples++;
+ }
+ file_put_contents($dansguardian_dir."/lists/exceptioniplist",dg_text_area_decode($config['installedpackages']['dansguardianips']['config'][0]['exceptioniplist']),LOCK_EX);
if($load_samples > 0)
write_config();
diff --git a/config/dansguardian/dansguardian_ips_header.xml b/config/dansguardian/dansguardian_ips_header.xml
index 33e50332..c15e31da 100644
--- a/config/dansguardian/dansguardian_ips_header.xml
+++ b/config/dansguardian/dansguardian_ips_header.xml
@@ -97,4 +97,18 @@
</tab>
</tabs>
<fields>
- \ No newline at end of file
+ <field>
+ <name>Exception IP list</name>
+ <type>listtopic</type>
+ </field>
+ <field>
+ <fieldname>exceptioniplist</fieldname>
+ <fielddescr>Exception Ip List</fielddescr>
+ <description><![CDATA[Include ip addresses and or ipadresses/netmask of computers from which web access should not be filtered.<br>
+ Leave empty to load dansguardian defaults.]]></description>
+ <type>textarea</type>
+ <cols>80</cols>
+ <rows>12</rows>
+ <encoding>base64</encoding>
+ </field>
+ \ No newline at end of file