From af4460ff3f18dff763e0a493ac71be37dd814435 Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Mon, 13 Jan 2014 10:51:45 -0500 Subject: Incorporate Ermal's comments -- use conf_mount_rw() only where needed. --- config/snort/snort_alerts.php | 5 ----- 1 file changed, 5 deletions(-) (limited to 'config/snort/snort_alerts.php') diff --git a/config/snort/snort_alerts.php b/config/snort/snort_alerts.php index 97174cdd..f232f897 100755 --- a/config/snort/snort_alerts.php +++ b/config/snort/snort_alerts.php @@ -216,7 +216,6 @@ if (($_GET['act'] == "addsuppress_srcip" || $_GET['act'] == "addsuppress_dstip") } if ($_GET['action'] == "clear" || $_POST['delete']) { - conf_mount_rw(); snort_post_delete_logs($snort_uuid); $fd = @fopen("/var/log/snort/snort_{$if_real}{$snort_uuid}/alert", "w+"); if ($fd) @@ -225,13 +224,11 @@ if ($_GET['action'] == "clear" || $_POST['delete']) { mwexec('/bin/chmod 660 /var/log/snort/*', true); if (file_exists("{$g['varrun_path']}/snort_{$if_real}{$snort_uuid}.pid")) mwexec("/bin/pkill -HUP -F {$g['varrun_path']}/snort_{$if_real}{$snort_uuid}.pid -a"); - conf_mount_ro(); header("Location: /snort/snort_alerts.php?instance={$instanceid}"); exit; } if ($_POST['download']) { - conf_mount_rw(); $save_date = exec('/bin/date "+%Y-%m-%d-%H-%M-%S"'); $file_name = "snort_logs_{$save_date}_{$if_real}.tar.gz"; exec("cd /var/log/snort/snort_{$if_real}{$snort_uuid} && /usr/bin/tar -czf /tmp/{$file_name} *"); @@ -256,8 +253,6 @@ if ($_POST['download']) { } else $savemsg = gettext("An error occurred while creating archive"); - - conf_mount_ro(); } /* Load up an array with the current Suppression List GID,SID values */ -- cgit v1.2.3