aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-11-07 12:54:56 +0100
committerdoktornotor <notordoktor@gmail.com>2015-11-07 12:54:56 +0100
commit05877b4ab13520f30c13e1f9909389f49eb2f29c (patch)
tree20c5b7def6e5f05b386b31358c6734398a8e95de
parent2d44eb0225d84775fe3dc9ba4c500386aac79ba7 (diff)
downloadpfsense-packages-05877b4ab13520f30c13e1f9909389f49eb2f29c.tar.gz
pfsense-packages-05877b4ab13520f30c13e1f9909389f49eb2f29c.tar.bz2
pfsense-packages-05877b4ab13520f30c13e1f9909389f49eb2f29c.zip
Add input validation for 'Use RAM Disks' on full install boxes (Bug #4608)
-rw-r--r--config/squidGuard/squidguard.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/config/squidGuard/squidguard.inc b/config/squidGuard/squidguard.inc
index c4c47bcc..4b5b7f43 100644
--- a/config/squidGuard/squidguard.inc
+++ b/config/squidGuard/squidguard.inc
@@ -103,10 +103,17 @@ 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.";
+ }
+ sg_check_config_data($input_errors);
+ }
}
# ------------------------------------------------------------------------------