diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2014-01-12 00:25:54 -0500 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2014-01-12 00:25:54 -0500 |
commit | c3b3ace436cfc9f0cc0ea7e5909c58582b7ed658 (patch) | |
tree | 123a04e6d47eb099d570682c142e6f93922a3e2e /config/snort/snort_alerts.php | |
parent | ba3edc934faf8887fd5ea9e785392d84f2cd288c (diff) | |
download | pfsense-packages-c3b3ace436cfc9f0cc0ea7e5909c58582b7ed658.tar.gz pfsense-packages-c3b3ace436cfc9f0cc0ea7e5909c58582b7ed658.tar.bz2 pfsense-packages-c3b3ace436cfc9f0cc0ea7e5909c58582b7ed658.zip |
Ensure conf_mount_rw() and conf_mount_ro() are used where needed.
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 */ |