diff options
author | Ermal <eri@pfsense.org> | 2012-07-22 15:09:49 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-07-22 15:09:49 +0000 |
commit | 406485d95d07795651d43cb7fba5c430e2e1fc22 (patch) | |
tree | df60d247ca6ff96802cbea2ce1fdc4f178e4bbb2 | |
parent | 24cb2b896036e54d27675842859d0ec71d630e02 (diff) | |
download | pfsense-packages-406485d95d07795651d43cb7fba5c430e2e1fc22.tar.gz pfsense-packages-406485d95d07795651d43cb7fba5c430e2e1fc22.tar.bz2 pfsense-packages-406485d95d07795651d43cb7fba5c430e2e1fc22.zip |
If general rules are missing show configured rules
-rw-r--r-- | config/snort/snort_rulesets.php | 8 |
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") |