diff options
author | Ermal <eri@pfsense.org> | 2012-07-18 21:35:58 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-07-18 21:35:58 +0000 |
commit | b786922185ad8c331426d4990560091f19022429 (patch) | |
tree | f683babd4f7f9ebd27a55b04795d24f58fafa43c /config/snort | |
parent | ebe8cc0d2a18e17426f67f7a481f2207fbab1806 (diff) | |
download | pfsense-packages-b786922185ad8c331426d4990560091f19022429.tar.gz pfsense-packages-b786922185ad8c331426d4990560091f19022429.tar.bz2 pfsense-packages-b786922185ad8c331426d4990560091f19022429.zip |
Put the sed in /tmp for easy processing
Diffstat (limited to 'config/snort')
-rw-r--r-- | config/snort/snort.inc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc index 6bc15017..59984978 100644 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -1304,11 +1304,12 @@ EOD; $sedcmd = "s/^alert\(.*\)classtype:sdf;\(.*\)/# alert\1classtype:sdf\2/g"; if (file_exists("{$snortdir}/preproc_rules/decoder.rules") && file_exists("{$snortdir}/preproc_rules/preprocessor.rules")) { - @file_put_contents("{$snortcfgdir}/tmp/sedcmd", $sedcmd); + @file_put_contents("{$g['tmp_path']}/sedcmd", $sedcmd); if (file_exists("{$snortcfgdir}/preproc_rules/preprocessor.rules")) - mwexec("/usr/bin/sed -Ie -f {$snortcfgdir}/tmp/sedcmd {$snortcfgdir}/preproc_rules/preprocessor.rules"); + mwexec("/usr/bin/sed -Ie -f {$g['tmp_path']}/sedcmd {$snortcfgdir}/preproc_rules/preprocessor.rules"); if (file_exists("{$snortcfgdir}/preproc_rules/decoder.rules")) - mwexec("/usr/bin/sed -Ie -f {$snortcfgdir}/tmp/sedcmd {$snortcfgdir}/preproc_rules/decoder.rules"); + mwexec("/usr/bin/sed -Ie -f {$g['tmp_path']}/sedcmd {$snortcfgdir}/preproc_rules/decoder.rules"); + @unlink("{$g['tmp_path']}/sedcmd"); $snort_misc_include_rules .= "include \$PREPROC_RULE_PATH/decoder.rules\n"; $snort_misc_include_rules .= "include \$PREPROC_RULE_PATH/preprocessor.rules\n"; |