From 165f7370b89857b4db89eb2d873fa120791bd8cf Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 2 Aug 2011 15:59:36 +0000 Subject: Polishing of the snort pacakge, part 2: * Get rid of snort_head.inc * No more apply settings button since it does not make sense * Other cleanups in many parts of the code Tested only on 2.0 --- config/snort/snort_interfaces_whitelist.php | 70 +++++++---------------------- 1 file changed, 16 insertions(+), 54 deletions(-) (limited to 'config/snort/snort_interfaces_whitelist.php') diff --git a/config/snort/snort_interfaces_whitelist.php b/config/snort/snort_interfaces_whitelist.php index 8f3f32ce..5a3b8650 100644 --- a/config/snort/snort_interfaces_whitelist.php +++ b/config/snort/snort_interfaces_whitelist.php @@ -54,24 +54,6 @@ if (isset($config['installedpackages']['snortglobal']['whitelist']['item'])) { $d_whitelistdirty_path = '/var/run/snort_whitelist.dirty'; -if ($_POST) { - - $pconfig = $_POST; - - if ($_POST['apply']) { - $retval = 0; - - if(stristr($retval, "error") <> true) - $savemsg = get_std_save_message($retval); - else - $savemsg = $retval; - if ($retval == 0) { - if (file_exists($d_whitelistdirty_path)) - unlink($d_whitelistdirty_path); - } - } -} - if ($_GET['act'] == "del") { if ($a_whitelist[$_GET['id']]) { /* make sure rule is not being referenced by any nat or filter rules */ @@ -79,38 +61,23 @@ if ($_GET['act'] == "del") { unset($a_whitelist[$_GET['id']]); write_config(); filter_configure(); - touch($d_whitelistdirty_path); header("Location: /snort/snort_interfaces_whitelist.php"); exit; } } $pgtitle = "Services: Snort: Whitelist"; -include("/usr/local/pkg/snort/snort_head.inc"); +include_once("head.inc"); ?> - - - + - -
-
' . $pgtitle . '

';}?>
@@ -119,24 +86,19 @@ echo $snort_general_css; - - -- cgit v1.2.3
- - - +
+