aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort/snort_rules.php
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-01-13 10:51:45 -0500
committerbmeeks8 <bmeeks8@bellsouth.net>2014-01-13 10:51:45 -0500
commitaf4460ff3f18dff763e0a493ac71be37dd814435 (patch)
tree357bc9cf44654cf1ac366e9244f28d2b8a014b9f /config/snort/snort_rules.php
parent8e3a6c43552fa36df9dd19a0dd0db312add43d11 (diff)
downloadpfsense-packages-af4460ff3f18dff763e0a493ac71be37dd814435.tar.gz
pfsense-packages-af4460ff3f18dff763e0a493ac71be37dd814435.tar.bz2
pfsense-packages-af4460ff3f18dff763e0a493ac71be37dd814435.zip
Incorporate Ermal's comments -- use conf_mount_rw() only where needed.
Diffstat (limited to 'config/snort/snort_rules.php')
-rwxr-xr-xconfig/snort/snort_rules.php6
1 files changed, 0 insertions, 6 deletions
diff --git a/config/snort/snort_rules.php b/config/snort/snort_rules.php
index 37b06914..a82d81d2 100755
--- a/config/snort/snort_rules.php
+++ b/config/snort/snort_rules.php
@@ -319,25 +319,21 @@ if ($_GET['act'] == "resetall" && !empty($rules_map)) {
}
if ($_POST['clear']) {
- conf_mount_rw();
unset($a_rule[$id]['customrules']);
write_config();
$rebuild_rules = true;
snort_generate_conf($a_rule[$id]);
$rebuild_rules = false;
- conf_mount_ro();
header("Location: /snort/snort_rules.php?id={$id}&openruleset={$currentruleset}");
exit;
}
if ($_POST['customrules']) {
- conf_mount_rw();
$a_rule[$id]['customrules'] = base64_encode($_POST['customrules']);
write_config();
$rebuild_rules = true;
snort_generate_conf($a_rule[$id]);
$rebuild_rules = false;
- conf_mount_ro();
$output = "";
$retcode = "";
exec("/usr/local/bin/snort -T -c {$snortdir}/snort_{$snort_uuid}_{$if_real}/snort.conf 2>&1", $output, $retcode);
@@ -356,7 +352,6 @@ if ($_POST['customrules']) {
}
else if ($_POST['apply']) {
- conf_mount_rw();
/* Save new configuration */
write_config();
@@ -367,7 +362,6 @@ else if ($_POST['apply']) {
$rebuild_rules = true;
snort_generate_conf($a_rule[$id]);
$rebuild_rules = false;
- conf_mount_ro();
/* Soft-restart Snort to live-load new rules */
snort_reload_config($a_rule[$id]);