aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort-dev
diff options
context:
space:
mode:
authorthompsa <andy@fud.org.nz>2010-01-28 12:48:40 +1300
committerthompsa <andy@fud.org.nz>2010-01-28 12:48:40 +1300
commit28cccf205ca421bf49560ebd698b1227b311ee93 (patch)
tree2e65561e4801165dc74b401787c7d87dda873679 /config/snort-dev
parent160a0a8fd0f1e17166cfb2562b92b8bfee9a0d32 (diff)
downloadpfsense-packages-28cccf205ca421bf49560ebd698b1227b311ee93.tar.gz
pfsense-packages-28cccf205ca421bf49560ebd698b1227b311ee93.tar.bz2
pfsense-packages-28cccf205ca421bf49560ebd698b1227b311ee93.zip
Fix rules extraction.
Diffstat (limited to 'config/snort-dev')
-rw-r--r--config/snort-dev/snort_download_rules.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/config/snort-dev/snort_download_rules.php b/config/snort-dev/snort_download_rules.php
index d871484c..2db097ae 100644
--- a/config/snort-dev/snort_download_rules.php
+++ b/config/snort-dev/snort_download_rules.php
@@ -330,6 +330,7 @@ if (file_exists("{$tmpfname}")) {
exec("/bin/mkdir -p {$snortdir}");
exec("/bin/mkdir -p {$snortdir}/rules");
exec("/bin/mkdir -p {$snortdir}/signatures");
+exec("/bin/mkdir -p /usr/local/lib/snort/dynamicrules/");
/* send current buffer */
ob_flush();
@@ -348,7 +349,8 @@ unhide_progress_bar_status();
/* download md5 sig from snort.org */
if ($snortdownload == "basic" || $snortdownload == "premium")
{
- if (file_exists("{$tmpfname}/{$snort_filename_md5}")) {
+ if (file_exists("{$tmpfname}/{$snort_filename_md5}") &&
+ filesize("{$tmpfname}/{$snort_filename_md5}") > 0) {
update_status(gettext("snort.org md5 temp file exists..."));
} else {
update_status(gettext("Downloading snort.org md5 file..."));
@@ -666,8 +668,8 @@ if ($snortdownload != "off")
update_status(gettext("Extracting rules..."));
update_output_window(gettext("May take a while..."));
exec("/bin/mkdir -p {$snortdir}/rules_bk/");
- exec("/usr/bin/tar xzf {$tmpfname}/{$snort_filename} -C {$snortdir}/rules_bk rules/" .
- " etc/" .
+ exec("/usr/bin/tar xzf {$tmpfname}/{$snort_filename} -C {$snortdir}/rules_bk rules/");
+ exec("/usr/bin/tar xzf {$tmpfname}/{$snort_filename} -C {$snortdir} etc/" .
" so_rules/precompiled/FreeBSD-7.0/i386/2.8.4/" .
" so_rules/bad-traffic.rules/" .
" so_rules/chat.rules/" .