aboutsummaryrefslogtreecommitdiffstats
path: root/config/dansguardian/dansguardian.inc
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/dansguardian/dansguardian.inc
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/dansguardian/dansguardian.inc')
-rwxr-xr-xconfig/dansguardian/dansguardian.inc13
1 files changed, 11 insertions, 2 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();