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_define_servers.php | 76 ++++++++++++++---------------------
1 file changed, 31 insertions(+), 45 deletions(-)
(limited to 'config/snort/snort_define_servers.php')
diff --git a/config/snort/snort_define_servers.php b/config/snort/snort_define_servers.php
index 735ea78f..68b5710a 100644
--- a/config/snort/snort_define_servers.php
+++ b/config/snort/snort_define_servers.php
@@ -136,7 +136,7 @@ if (isset($id) && $a_nat[$id]) {
}
/* convert fake interfaces to real */
-$if_real = convert_friendly_interface_to_real_interface_name2($pconfig['interface']);
+$if_real = snort_get_real_interface($pconfig['interface']);
$snort_uuid = $config['installedpackages']['snortglobal']['rule'][$id]['uuid'];
@@ -234,7 +234,6 @@ if ($_POST["Submit"]) {
write_config();
sync_snort_package_all($id, $if_real, $snort_uuid);
- touch($d_snortconfdirty_path);
/* after click go to this page */
header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' );
@@ -249,33 +248,20 @@ if ($_POST["Submit"]) {
}
}
-/* this will exec when alert says apply */
-if ($_POST['apply']) {
-
- if (file_exists($d_snortconfdirty_path)) {
- sync_snort_package();
- unlink($d_snortconfdirty_path);
- }
-}
-
$pgtitle = "Snort: Interface $id$if_real Define Servers";
-include("/usr/local/pkg/snort/snort_head.inc");
+include_once("head.inc");
?>
-
-' . $pgtitle . '