From 0ed87a96c2fbc91f124bbd7bb8a2797dd9901e53 Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Mon, 16 Nov 2015 17:33:35 -0500 Subject: Add reminder to save setting changes to PREPROCESSORS tab. --- config/snort/snort_frag3_engine.php | 3 +++ config/snort/snort_ftp_client_engine.php | 3 +++ config/snort/snort_ftp_server_engine.php | 3 +++ config/snort/snort_httpinspect_engine.php | 3 +++ config/snort/snort_preprocessors.php | 17 ++++++++++++++++- config/snort/snort_stream5_engine.php | 3 +++ 6 files changed, 31 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/snort/snort_frag3_engine.php b/config/snort/snort_frag3_engine.php index 9489bf16..33f06a87 100644 --- a/config/snort/snort_frag3_engine.php +++ b/config/snort/snort_frag3_engine.php @@ -187,6 +187,9 @@ if ($_POST['save']) { /* Now write the new engine array to conf */ write_config("Snort pkg: modified frag3 engine settings."); + // We have saved a preproc config change, so set "dirty" flag + mark_subsystem_dirty('snort_preprocessors'); + header("Location: /snort/snort_preprocessors.php?id={$id}#frag3_row"); exit; } diff --git a/config/snort/snort_ftp_client_engine.php b/config/snort/snort_ftp_client_engine.php index f462efa8..2f3cd1bd 100644 --- a/config/snort/snort_ftp_client_engine.php +++ b/config/snort/snort_ftp_client_engine.php @@ -218,6 +218,9 @@ if ($_POST['save']) { /* Now write the new engine array to conf */ write_config("Snort pkg: modified ftp_telnet_client engine settings."); + // We have saved a preproc config change, so set "dirty" flag + mark_subsystem_dirty('snort_preprocessors'); + header("Location: /snort/snort_preprocessors.php?id={$id}#ftp_telnet_row_ftp_proto_opts"); exit; } diff --git a/config/snort/snort_ftp_server_engine.php b/config/snort/snort_ftp_server_engine.php index cb9abc9c..7f3e5a10 100644 --- a/config/snort/snort_ftp_server_engine.php +++ b/config/snort/snort_ftp_server_engine.php @@ -189,6 +189,9 @@ if ($_POST['save']) { /* Now write the new engine array to conf */ write_config("Snort pkg: modified ftp_telnet_server engine settings."); + // We have saved a preproc config change, so set "dirty" flag + mark_subsystem_dirty('snort_preprocessors'); + header("Location: /snort/snort_preprocessors.php?id={$id}#ftp_telnet_row_ftp_proto_opts"); exit; } diff --git a/config/snort/snort_httpinspect_engine.php b/config/snort/snort_httpinspect_engine.php index 15d70f09..55bdb5a7 100644 --- a/config/snort/snort_httpinspect_engine.php +++ b/config/snort/snort_httpinspect_engine.php @@ -304,6 +304,9 @@ if ($_POST['save']) { // Now write the new engine array to conf write_config("Snort pkg: modified http_inspect engine settings."); + // We have saved a preproc config change, so set "dirty" flag + mark_subsystem_dirty('snort_preprocessors'); + header("Location: /snort/snort_preprocessors.php?id={$id}#httpinspect_row"); exit; } diff --git a/config/snort/snort_preprocessors.php b/config/snort/snort_preprocessors.php index dd8ec660..76582763 100755 --- a/config/snort/snort_preprocessors.php +++ b/config/snort/snort_preprocessors.php @@ -263,6 +263,9 @@ if ($_GET['act'] == "import" && isset($_GET['varname']) && !empty($_GET['varvalu // Now retrieve the "selected alias" returned from SELECT ALIAS page $pconfig[$_GET['varname']] = htmlspecialchars($_GET['varvalue']); + + // We have made a preproc config change, so set "dirty" flag + mark_subsystem_dirty('snort_preprocessors'); } // Handle deleting of any of the multiple configuration engines @@ -397,7 +400,7 @@ if ($_POST['ResetAll']) { $savemsg = gettext("All preprocessor settings have been reset to their defaults."); } -if ($_POST['save']) { +if ($_POST['save'] || $_POST['apply']) { $natent = array(); $natent = $pconfig; @@ -590,6 +593,9 @@ if ($_POST['save']) { /* Sync to configured CARP slaves if any are enabled */ snort_sync_on_changes(); + // We have saved changes, so clear "dirty" flag + clear_subsystem_dirty('snort_preprocessors'); + /* after click go to this page */ header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); @@ -619,6 +625,10 @@ if ($_POST['btn_import']) { $a_nat[$id]['max_attribute_services_per_host'] = $pconfig['max_attribute_services_per_host']; write_config("Snort pkg: imported Host Attribute Table data for {$a_nat[$id]['interface']}."); } + + // We have made a preproc config change, so set "dirty" flag + mark_subsystem_dirty('snort_preprocessors'); + 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' ); @@ -675,6 +685,11 @@ if ($savemsg) {
+ +

+" . gettext("Click SAVE when finished to apply the change to the Snort configuration."));?> + +