diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2014-09-20 14:41:57 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2014-12-15 12:04:33 -0500 |
commit | 9c33543db52aea06e01d4289a55fe9522a40327c (patch) | |
tree | 538429d4bb2cda6effb86f4249d6aa82baa00b7c /config | |
parent | 0e931059d5cf44828b0b1dd29a9102618d0ce2a1 (diff) | |
download | pfsense-packages-9c33543db52aea06e01d4289a55fe9522a40327c.tar.gz pfsense-packages-9c33543db52aea06e01d4289a55fe9522a40327c.tar.bz2 pfsense-packages-9c33543db52aea06e01d4289a55fe9522a40327c.zip |
Don't lose MySQL and other settings when only disabling Barnyard2.
Diffstat (limited to 'config')
-rw-r--r-- | config/suricata/suricata_barnyard.php | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/config/suricata/suricata_barnyard.php b/config/suricata/suricata_barnyard.php index 987055fd..21611ba8 100644 --- a/config/suricata/suricata_barnyard.php +++ b/config/suricata/suricata_barnyard.php @@ -89,6 +89,27 @@ if (isset($id) && $a_nat[$id]) { } if ($_POST['save']) { + + // If disabling Barnyard2 on the interface, stop any + // currently running instance, then save the disabled + // state and exit so as to preserve settings. + if ($_POST['barnyard_enable'] != 'on') { + $a_nat[$id]['barnyard_enable'] = 'off'; + write_config("Suricata pkg: modified Barnyard2 settings."); + suricata_barnyard_stop($a_nat[$id], get_real_interface($a_nat[$id]['interface'])); + + // No need to rebuild rules for Barnyard2 changes + $rebuild_rules = false; + sync_suricata_package_config(); + 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' ); + header( 'Cache-Control: post-check=0, pre-check=0', false ); + header( 'Pragma: no-cache' ); + header("Location: /suricata/suricata_barnyard.php"); + exit; + } + // Check that at least one output plugin is enabled if ($_POST['barnyard_mysql_enable'] != 'on' && $_POST['barnyard_syslog_enable'] != 'on' && $_POST['barnyard_bro_ids_enable'] != 'on' && $_POST['barnyard_enable'] == "on") @@ -606,11 +627,11 @@ function enable_change(enable_change) { document.iform.barnconfigpassthru.disabled = endis; } -enable_change(false); toggle_mySQL(); toggle_syslog(); toggle_local_syslog(); toggle_bro_ids(); +enable_change(false); </script> |