From e9a1eaa5bf1681f828cd6abccb5204016965cf43 Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 9 Jul 2012 10:36:39 +0000 Subject: Use proper class for select inputs. Clean up some more code around and try to fix alerts display page --- config/snort/snort.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'config/snort/snort.inc') diff --git a/config/snort/snort.inc b/config/snort/snort.inc index 149b6abb..677f0bca 100644 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -353,7 +353,7 @@ function snort_get_real_interface($interface) { by touch and rm, snort will lose sync and not log. */ -function post_delete_logs() +function snort_post_delete_logs($snort_uuid = 0) { global $config, $g; @@ -362,11 +362,12 @@ function post_delete_logs() return; foreach ($config['installedpackages']['snortglobal']['rule'] as $value) { + if ($value['uuid'] != $snort_uuid) + continue; $if_real = snort_get_real_interface($value['interface']); - $snort_uuid = $value['uuid']; $snort_log_dir = "/var/log/snort/snort_{$if_real}{$snort_uuid}"; - if ($if_real != '' && $snort_uuid != '') { + if ($if_real != '') { $filelist = glob("{$snort_log_dir}/*{$snort_uuid}_{$if_real}.u2.*"); unset($filelist[count($filelist) - 1]); foreach ($filelist as $file) -- cgit v1.2.3