]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ids.cgi: Pipe the oinkmaster output to the logger binary
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 17 Dec 2017 18:10:21 +0000 (19:10 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Thu, 26 Jul 2018 09:52:35 +0000 (11:52 +0200)
This will allow anybody, to access the log of oinkmaster and
get detailed information about any changes which have been done
on the ruleset.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/ids.cgi

index 52a9596b6cde819f5e14ea6883511a07e8129385..80ef2343e73be1d9f7b228a786c2e52742ea326b 100644 (file)
@@ -659,7 +659,7 @@ sub downloadruleset {
 
 sub oinkmaster () {
        # Call oinkmaster to generate ruleset.
-       system("/usr/local/bin/oinkmaster.pl -v -s -u file:///var/tmp/snortrules.tar.gz -C /var/ipfire/snort/oinkmaster.conf -o /etc/snort/rules 2>&1 &");
+       system("/usr/local/bin/oinkmaster.pl -v -s -u file://$rulestarball -C /var/ipfire/snort/oinkmaster.conf -o /etc/snort/rules 2>&1 |logger -t oinkmaster");
 }
 
 sub readrulesfile ($) {