From c3b3ace436cfc9f0cc0ea7e5909c58582b7ed658 Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Sun, 12 Jan 2014 00:25:54 -0500 Subject: Ensure conf_mount_rw() and conf_mount_ro() are used where needed. --- config/snort/snort_preprocessors.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'config/snort/snort_preprocessors.php') diff --git a/config/snort/snort_preprocessors.php b/config/snort/snort_preprocessors.php index 289a3941..d1b3e5be 100755 --- a/config/snort/snort_preprocessors.php +++ b/config/snort/snort_preprocessors.php @@ -509,25 +509,27 @@ elseif ($_POST['Submit']) { $natent['stream5_track_udp'] = $_POST['stream5_track_udp'] ? 'on' : 'off'; $natent['stream5_track_icmp'] = $_POST['stream5_track_icmp'] ? 'on' : 'off'; - /* If 'preproc_auto_rule_disable' is off, then clear log file */ - if ($natent['preproc_auto_rule_disable'] == 'off') - @unlink("{$disabled_rules_log}"); - if (isset($id) && $a_nat[$id]) { $a_nat[$id] = $natent; write_config(); } - /* Set flag to rebuild rules for this interface */ - $rebuild_rules = true; + conf_mount_rw(); /*************************************************/ /* Update the snort.conf file and rebuild the */ /* rules for this interface. */ /*************************************************/ + $rebuild_rules = true; snort_generate_conf($natent); $rebuild_rules = false; + /* If 'preproc_auto_rule_disable' is off, then clear log file */ + if ($natent['preproc_auto_rule_disable'] == 'off') + @unlink("{$disabled_rules_log}"); + + conf_mount_ro(); + /*******************************************************/ /* Signal Snort to reload Host Attribute Table if one */ /* is configured and saved. */ -- cgit v1.2.3