diff options
Diffstat (limited to 'config/snort/snort_alerts.php')
-rwxr-xr-x | config/snort/snort_alerts.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config/snort/snort_alerts.php b/config/snort/snort_alerts.php index 2b957f61..97174cdd 100755 --- a/config/snort/snort_alerts.php +++ b/config/snort/snort_alerts.php @@ -221,16 +221,17 @@ if ($_GET['action'] == "clear" || $_POST['delete']) { $fd = @fopen("/var/log/snort/snort_{$if_real}{$snort_uuid}/alert", "w+"); if ($fd) fclose($fd); - conf_mount_ro(); /* XXX: This is needed if snort is run as snort user */ 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} *"); @@ -255,6 +256,8 @@ 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 */ |