diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2013-12-17 20:07:34 -0500 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2013-12-17 20:07:34 -0500 |
commit | 073f3e78629de1b97945d744d4339615094b4d4e (patch) | |
tree | 0e82c6fcd878e62334759ff2c1ad031ab318e829 /config/snort/snort_check_for_rule_updates.php | |
parent | 164401c547782f155d87d83a7307baa3a63fad98 (diff) | |
download | pfsense-packages-073f3e78629de1b97945d744d4339615094b4d4e.tar.gz pfsense-packages-073f3e78629de1b97945d744d4339615094b4d4e.tar.bz2 pfsense-packages-073f3e78629de1b97945d744d4339615094b4d4e.zip |
Update copyright info and update for 3.0.1 release.
Diffstat (limited to 'config/snort/snort_check_for_rule_updates.php')
-rwxr-xr-x | config/snort/snort_check_for_rule_updates.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/config/snort/snort_check_for_rule_updates.php b/config/snort/snort_check_for_rule_updates.php index 28539f1f..a93aef56 100755 --- a/config/snort/snort_check_for_rule_updates.php +++ b/config/snort/snort_check_for_rule_updates.php @@ -5,6 +5,7 @@ * Copyright (C) 2006 Scott Ullrich * Copyright (C) 2009 Robert Zelaya * Copyright (C) 2011-2012 Ermal Luci + * Copyright (C) 2013 Bill Meeks * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -88,10 +89,15 @@ $et_enabled = $config['installedpackages']['snortglobal']['emergingthreats']; $tmpfname = "{$snortdir}/tmp/snort_rules_up"; /* Grab the Snort binary version programmatically and use it to construct */ -/* the proper Snort VRT rules tarball and md5 filenames. */ +/* the proper Snort VRT rules tarball and md5 filenames. Fallback to a */ +/* default in the event we fail. */ +$snortver = array(); exec("/usr/local/bin/snort -V 2>&1 |/usr/bin/grep Version | /usr/bin/cut -c20-26", $snortver); // Save the version with decimal delimiters for use in extracting the rules $snort_version = $snortver[0]; +if (empty($snort_version)) + $snort_version = "2.9.5.5"; + // Create a collapsed version string for use in the tarball filename $snortver[0] = str_replace(".", "", $snortver[0]); $snort_filename = "snortrules-snapshot-{$snortver[0]}.tar.gz"; @@ -695,8 +701,7 @@ if ($snortdownload == 'on' || $emergingthreats == 'on' || $snortcommunityrules = } /* Start the rules rebuild proccess for each configured interface */ - if (is_array($config['installedpackages']['snortglobal']['rule']) && - !empty($config['installedpackages']['snortglobal']['rule'])) { + if (is_array($config['installedpackages']['snortglobal']['rule'])) { /* Set the flag to force rule rebuilds since we downloaded new rules, */ /* except when in post-install mode. Post-install does its own rebuild. */ |