aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort/snort_rulesets.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-07-14 07:22:29 +0000
committerErmal <eri@pfsense.org>2012-07-14 07:22:29 +0000
commitb2b2b71abf4bc071006e431caeca7818d10d6297 (patch)
tree67f07a7786132ea8d167e0e90f81d7c5d703648e /config/snort/snort_rulesets.php
parentec1b612b730f0754fa48cf47fc0c453703bb1dbf (diff)
downloadpfsense-packages-b2b2b71abf4bc071006e431caeca7818d10d6297.tar.gz
pfsense-packages-b2b2b71abf4bc071006e431caeca7818d10d6297.tar.bz2
pfsense-packages-b2b2b71abf4bc071006e431caeca7818d10d6297.zip
Correct update script to not mess around rules during update of snort or emerging threats. Also make oink confs correct and usable
Diffstat (limited to 'config/snort/snort_rulesets.php')
-rw-r--r--config/snort/snort_rulesets.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/config/snort/snort_rulesets.php b/config/snort/snort_rulesets.php
index 34bba9e5..cc017eab 100644
--- a/config/snort/snort_rulesets.php
+++ b/config/snort/snort_rulesets.php
@@ -51,15 +51,15 @@ if (is_null($id)) {
function snort_copy_rules($files, $snortdir, $snort_uuid, $if_real) {
- if (empty($files))
- return;
-
- conf_mount_rw();
- foreach ($files as $file) {
- if (!file_exists("{$snortdir}/snort_{$snort_uuid}_{$if_real}/rules/{$file}"))
- @copy("{$snortdir}/rules/{$file}", "{$snortdir}/snort_{$snort_uuid}_{$if_real}/rules/{$file}");
- }
- conf_mount_ro();
+ if (empty($files))
+ return;
+
+ conf_mount_rw();
+ foreach ($files as $file) {
+ if (!file_exists("{$snortdir}/snort_{$snort_uuid}_{$if_real}/rules/{$file}"))
+ @copy("{$snortdir}/rules/{$file}", "{$snortdir}/snort_{$snort_uuid}_{$if_real}/rules/{$file}");
+ }
+ conf_mount_ro();
}
if (isset($id) && $a_nat[$id]) {