aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort/snort_interfaces.php
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-10-09 14:50:22 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-10-09 14:50:22 -0400
commit1682d08e3e80b36c8d4cae1cab27b70bee4d557f (patch)
treed292396d751bd72092091c76ca47f9afa8644098 /config/snort/snort_interfaces.php
parentdb4778c2478f525ebc24d351472c036187fd4a81 (diff)
downloadpfsense-packages-1682d08e3e80b36c8d4cae1cab27b70bee4d557f.tar.gz
pfsense-packages-1682d08e3e80b36c8d4cae1cab27b70bee4d557f.tar.bz2
pfsense-packages-1682d08e3e80b36c8d4cae1cab27b70bee4d557f.zip
Wrap calls to sync_snort_package_config() with conf_mount_rw().
Diffstat (limited to 'config/snort/snort_interfaces.php')
-rwxr-xr-xconfig/snort/snort_interfaces.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/config/snort/snort_interfaces.php b/config/snort/snort_interfaces.php
index c3325f4a..6a5a1aea 100755
--- a/config/snort/snort_interfaces.php
+++ b/config/snort/snort_interfaces.php
@@ -62,7 +62,6 @@ if (isset($_POST['del_x'])) {
// Finally delete the interface's config entry entirely
unset($a_nat[$rulei]);
}
- conf_mount_ro();
/* If all the Snort interfaces are removed, then unset the interfaces config array. */
if (empty($a_nat))
@@ -70,9 +69,8 @@ if (isset($_POST['del_x'])) {
write_config("Snort pkg: deleted one or more Snort interfaces.");
sleep(2);
-
sync_snort_package_config();
-
+ conf_mount_ro();
header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' );
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
@@ -92,7 +90,9 @@ if ($_POST['bartoggle'] && is_numericint($_POST['id'])) {
if (!snort_is_running($snortcfg['uuid'], $if_real, 'barnyard2')) {
log_error("Toggle (barnyard starting) for {$if_friendly}({$if_real})...");
+ conf_mount_rw();
sync_snort_package_config();
+ conf_mount_ro();
snort_barnyard_start($snortcfg, $if_real);
} else {
log_error("Toggle (barnyard stopping) for {$if_friendly}({$if_real})...");
@@ -115,7 +115,9 @@ if ($_POST['toggle'] && is_numericint($_POST['id'])) {
/* set flag to rebuild interface rules before starting Snort */
$rebuild_rules = true;
+ conf_mount_rw();
sync_snort_package_config();
+ conf_mount_ro();
$rebuild_rules = false;
snort_start($snortcfg, $if_real);
}