From a4773870bd45062d305acdab112ab2aad740f6dc Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 9 Jul 2012 18:38:08 +0000 Subject: Revert 958efd439784459a5848fb05afe1560c4db285d7 --- config/snort/snort_rulesets.php | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'config/snort/snort_rulesets.php') diff --git a/config/snort/snort_rulesets.php b/config/snort/snort_rulesets.php index f399655e..58dd3820 100644 --- a/config/snort/snort_rulesets.php +++ b/config/snort/snort_rulesets.php @@ -32,7 +32,7 @@ require_once("guiconfig.inc"); require_once("/usr/local/pkg/snort/snort.inc"); -global $g; +global $g, $snortdir; if (!is_array($config['installedpackages']['snortglobal']['rule'])) { $config['installedpackages']['snortglobal']['rule'] = array(); @@ -63,9 +63,9 @@ $pgtitle = "Snort: Interface $id $iface_uuid $if_real Categories"; /* Check if the rules dir is empy if so warn the user */ /* TODO give the user the option to delete the installed rules rules */ -$isrulesfolderempty = exec("ls -A /usr/local/etc/snort/snort_{$iface_uuid}_{$if_real}/rules/*.rules"); +$isrulesfolderempty = exec("ls -A {$snortdir}/snort_{$iface_uuid}_{$if_real}/rules/*.rules"); if ($isrulesfolderempty == "") { - $isrulesfolderempty = exec("ls -A /usr/local/etc/snort/rules/*.rules"); + $isrulesfolderempty = exec("ls -A {$snortdir}/rules/*.rules"); if ($isrulesfolderempty == "") { include_once("head.inc"); include("fbegin.inc"); @@ -104,7 +104,7 @@ if ($isrulesfolderempty == "") { \n \n \n \n
\n - # The rules directory is empty. /usr/local/etc/snort/snort_{$iface_uuid}_{$if_real}/rules \n + # The rules directory is empty. {$snortdir}/snort_{$iface_uuid}_{$if_real}/rules \n
\n @@ -126,7 +126,7 @@ if ($isrulesfolderempty == "") { exit(0); } else { /* Make sure that we have the rules */ - mwexec("/bin/cp /usr/local/etc/snort/rules/*.rules /usr/local/etc/snort/snort_{$iface_uuid}_{$if_real}/rules", true); + mwexec("/bin/cp {$snortdir}/rules/*.rules {$snortdir}/snort_{$iface_uuid}_{$if_real}/rules", true); } } @@ -232,9 +232,8 @@ if (file_exists($d_snortconfdirty_path)) { - \n"; echo "\n"; echo "\n"; - echo "{$file}\n"; + echo "{$file}\n"; echo "\n\n\n"; - //echo ""; - //echo "description"; - //echo ""; } - - ?> + ?> @@ -284,7 +279,6 @@ if (file_exists($d_snortconfdirty_path)) { -

NOTE: You can click on a ruleset name to edit the ruleset.

-- cgit v1.2.3