aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-07-22 15:09:49 +0000
committerErmal <eri@pfsense.org>2012-07-22 15:09:49 +0000
commit406485d95d07795651d43cb7fba5c430e2e1fc22 (patch)
treedf60d247ca6ff96802cbea2ce1fdc4f178e4bbb2 /config
parent24cb2b896036e54d27675842859d0ec71d630e02 (diff)
downloadpfsense-packages-406485d95d07795651d43cb7fba5c430e2e1fc22.tar.gz
pfsense-packages-406485d95d07795651d43cb7fba5c430e2e1fc22.tar.bz2
pfsense-packages-406485d95d07795651d43cb7fba5c430e2e1fc22.zip
If general rules are missing show configured rules
Diffstat (limited to 'config')
-rw-r--r--config/snort/snort_rulesets.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/config/snort/snort_rulesets.php b/config/snort/snort_rulesets.php
index a3d41762..3d6de228 100644
--- a/config/snort/snort_rulesets.php
+++ b/config/snort/snort_rulesets.php
@@ -177,7 +177,8 @@ if ($savemsg) {
<table id="maintable" class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<?php
$isrulesfolderempty = glob("{$snortdir}/rules/*.rules");
- if (empty($isrulesfolderempty)):
+ $iscfgdirempty = glob("{$snortdir}/snort_{$snort_uuid}_{$if_real}/rules/*.rules");
+ if (empty($isrulesfolderempty) && empty($iscfgdirempty)):
?>
<tr>
<td>
@@ -226,7 +227,10 @@ if ($savemsg) {
$emergingrules = array();
$snortsorules = array();
$snortrules = array();
- $dh = opendir("{$snortdir}/rules/");
+ if (empty($isrulesfolderempty))
+ $dh = opendir("{$snortdir}/snort_{$snort_uuid}_{$if_real}/rules/");
+ else
+ $dh = opendir("{$snortdir}/rules/");
while (false !== ($filename = readdir($dh))) {
$filename = basename($filename);
if (substr($filename, -5) != "rules")