diff options
author | Ermal Luçi <eri@pfsense.org> | 2014-01-13 03:41:15 -0800 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2014-01-13 03:41:15 -0800 |
commit | 13d9babd775498cf1e3b796e07030e946e1cb12a (patch) | |
tree | d21f85d6fcbee014b0221e546927548eced3a340 /config/snort/snort_rules.php | |
parent | 141c1dc4774370210c41580da5ba897bc54c8e12 (diff) | |
parent | 8e3a6c43552fa36df9dd19a0dd0db312add43d11 (diff) | |
download | pfsense-packages-13d9babd775498cf1e3b796e07030e946e1cb12a.tar.gz pfsense-packages-13d9babd775498cf1e3b796e07030e946e1cb12a.tar.bz2 pfsense-packages-13d9babd775498cf1e3b796e07030e946e1cb12a.zip |
Merge pull request #571 from bmeeks8/master
Snort 2.9.5.5 pkg v3.0.2 Update -- Bug Fixes
Diffstat (limited to 'config/snort/snort_rules.php')
-rwxr-xr-x | config/snort/snort_rules.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/config/snort/snort_rules.php b/config/snort/snort_rules.php index 0434f88f..37b06914 100755 --- a/config/snort/snort_rules.php +++ b/config/snort/snort_rules.php @@ -319,21 +319,25 @@ 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); @@ -352,7 +356,7 @@ if ($_POST['customrules']) { } else if ($_POST['apply']) { - + conf_mount_rw(); /* Save new configuration */ write_config(); @@ -363,6 +367,10 @@ 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]); /* Return to this same page */ header("Location: /snort/snort_rules.php?id={$id}&openruleset={$currentruleset}"); |