diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-10-10 01:02:26 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-10-10 01:02:26 +0000 |
commit | b5028e3ba56c22bb7ad5fabdf6f99b38d477f5d0 (patch) | |
tree | a015ef9dfa99a6e94c374c07a6e6c2c43bc039db /packages/snort | |
parent | 62181d377c8970857817bad15e14d91c78a72d11 (diff) | |
download | pfsense-packages-b5028e3ba56c22bb7ad5fabdf6f99b38d477f5d0.tar.gz pfsense-packages-b5028e3ba56c22bb7ad5fabdf6f99b38d477f5d0.tar.bz2 pfsense-packages-b5028e3ba56c22bb7ad5fabdf6f99b38d477f5d0.zip |
Only read in snort alert file if it exists.
Diffstat (limited to 'packages/snort')
-rw-r--r-- | packages/snort/snort.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/snort/snort.inc b/packages/snort/snort.inc index 28134af6..6de817be 100644 --- a/packages/snort/snort.inc +++ b/packages/snort/snort.inc @@ -495,11 +495,14 @@ function update_all_status($status) { } } -$snort_alert_file_split = split("\n", file_get_contents("/var/log/snort/alert")); +if(file_exists("/var/log/snort/alert")) + $snort_alert_file_split = split("\n", file_get_contents("/var/log/snort/alert")); /* obtain alert description for an ip address */ function get_snort_alert($ip) { global $snort_alert_file_split, $snort_config; + if(!file_exists("/var/log/snort/alert")) + return; if(!$snort_config) $snort_config = read_snort_config_cache(); if($snort_config[$ip]) |