aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-11-07 15:36:00 +0100
committerdoktornotor <notordoktor@gmail.com>2015-11-07 15:36:00 +0100
commita6deebf1ce520e0918d49543b12903849f8b47da (patch)
treeb01097dd103c5a9ea193026557a977f477f0ce22 /config
parenta9737fcef254292d7653c2e0fb8b733e378cd4e0 (diff)
downloadpfsense-packages-a6deebf1ce520e0918d49543b12903849f8b47da.tar.gz
pfsense-packages-a6deebf1ce520e0918d49543b12903849f8b47da.tar.bz2
pfsense-packages-a6deebf1ce520e0918d49543b12903849f8b47da.zip
Add checks for ramdisks, force disable blacklists usage on nanobsd (Bug #4608)
Diffstat (limited to 'config')
-rw-r--r--config/squidGuard-devel/squidguard.inc14
1 files changed, 13 insertions, 1 deletions
diff --git a/config/squidGuard-devel/squidguard.inc b/config/squidGuard-devel/squidguard.inc
index 0be94a6f..fe19fa8d 100644
--- a/config/squidGuard-devel/squidguard.inc
+++ b/config/squidGuard-devel/squidguard.inc
@@ -103,10 +103,22 @@ sg_init(convert_pfxml_to_sgxml());
# ==============================================================================
function squidguard_validate($post, &$input_errors)
{
+ global $config, $g;
$submit = isset($_GET['submit']) ? $_GET['submit'] : $_POST['submit'];
# check config if 'Apply'
- if ($submit === APPLY_BTN) sg_check_config_data($input_errors);
+ if ($submit === APPLY_BTN) {
+ // XXX:Bug #4608
+ if (($g['platform'] == "pfSense") && isset($config['system']['use_mfs_tmpvar'])) {
+ $input_errors[] = "Please, disable 'Use RAM Disks' under System: Advanced: Miscellaneous to avoid SquidGuard configuration breakage on reboot.";
+ }
+ if ($g['platform'] != "pfSense") {
+ if ($post['blacklist'] != "" || $post['blacklist_proxy'] != "" || $post['blacklist_url'] != "") {
+ $input_errors[] = "Blacklists usage is NOT supported on NanoBSD. Disable 'Blacklist' option in 'General settings'.";
+ }
+ }
+ sg_check_config_data($input_errors);
+ }
}
# ------------------------------------------------------------------------------