Skip to content

Commit

Permalink
sed with invalid args called, either -e for expression or -f for file…
Browse files Browse the repository at this point in the history
…, but not both. -I.bak to suggest an extensions .bak for the unaltered file.
  • Loading branch information
Fesoj committed Jul 20, 2012
1 parent f904c9d commit 0e97519
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/snort/snort.inc
Expand Up @@ -1305,8 +1305,8 @@ EOD;
if (file_exists("{$snortcfgdir}/preproc_rules/decoder.rules") &&
file_exists("{$snortcfgdir}/preproc_rules/preprocessor.rules")) {
@file_put_contents("{$g['tmp_path']}/sedcmd", $sedcmd);
mwexec("/usr/bin/sed -I '' -e -f {$g['tmp_path']}/sedcmd {$snortcfgdir}/preproc_rules/preprocessor.rules");
mwexec("/usr/bin/sed -I '' -e -f {$g['tmp_path']}/sedcmd {$snortcfgdir}/preproc_rules/decoder.rules");
mwexec("/usr/bin/sed -I.bak -f {$g['tmp_path']}/sedcmd {$snortcfgdir}/preproc_rules/preprocessor.rules");
mwexec("/usr/bin/sed -I.bak -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";
Expand Down

0 comments on commit 0e97519

Please sign in to comment.