aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-01-23 23:33:27 +0100
committerErmal <eri@pfsense.org>2013-01-23 23:33:27 +0100
commit0fc8894da8c5cc072636cf8514b79c173f6d7b52 (patch)
treeb9c26bea40590206f2b5547a35e9cc00cefb1de9 /config
parentc94259340f341e532246c415e93158f02f3b5f0a (diff)
downloadpfsense-packages-0fc8894da8c5cc072636cf8514b79c173f6d7b52.tar.gz
pfsense-packages-0fc8894da8c5cc072636cf8514b79c173f6d7b52.tar.bz2
pfsense-packages-0fc8894da8c5cc072636cf8514b79c173f6d7b52.zip
More checking for existence of file
Diffstat (limited to 'config')
-rwxr-xr-xconfig/snort/snort.inc8
1 files changed, 8 insertions, 0 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc
index cd76db6f..afc9c861 100755
--- a/config/snort/snort.inc
+++ b/config/snort/snort.inc
@@ -756,6 +756,8 @@ function snort_build_sid_msg_map($rules_path, $sid_file) {
continue;
/* Read the file into an array, skipping empty lines. */
+ if (!file_exists($file))
+ continue;
$rules_array = file($file, FILE_SKIP_EMPTY_LINES);
$record = "";
$b_Multiline = false;
@@ -824,6 +826,8 @@ function snort_merge_reference_configs($cfg_in, $cfg_out) {
$outMap = array();
foreach ($cfg_in as $file) {
+ if (!file_exists($file))
+ continue;
$in = file($file, FILE_SKIP_EMPTY_LINES);
foreach ($in as $line) {
/* Skip comment lines */
@@ -859,6 +863,8 @@ function snort_merge_classification_configs($cfg_in, $cfg_out) {
$outMap = array();
foreach ($cfg_in as $file) {
+ if (!file_exists($file))
+ continue;
$in = file($file, FILE_SKIP_EMPTY_LINES);
foreach ($in as $line) {
if (preg_match('/(.*:)(\s*.*),(.*),(.*)/', $line, $matches)) {
@@ -947,6 +953,8 @@ function snort_load_rules_map($rules_path) {
if (!file_exists($file))
continue;
+ if (!file_exists($file))
+ continue;
$rules_array = file($file, FILE_SKIP_EMPTY_LINES);
$record = "";
$b_Multiline = false;