]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ids.cgi: Move function to call oinkmaster to ids-functions.pl
authorStefan Schantl <stefan.schantl@ipfire.org>
Wed, 14 Feb 2018 07:58:18 +0000 (08:58 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Thu, 26 Jul 2018 09:56:45 +0000 (11:56 +0200)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/cfgroot/ids-functions.pl
html/cgi-bin/ids.cgi

index 75f806f2db84b8140128d4667b742cfaa154e630..024a4f72e009b0a5aa48ad309c2f24463ae543d2 100644 (file)
@@ -147,4 +147,12 @@ sub downloadruleset {
        return;
 }
 
+#
+## A tiny wrapper function to call the oinkmaster script.
+#
+sub oinkmaster () {
+       # Call oinkmaster to generate ruleset.
+       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");
+}
+
 1;
index c7c246ea5e5c9921f11988fe65ef408b490a08ed..47a70c61d6667add9cfc885eead823f0d2dd7a7a 100644 (file)
@@ -598,11 +598,12 @@ END
         exit;
 }
 
-sub oinkmaster () {
-       # Call oinkmaster to generate ruleset.
-       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");
-}
-
+#
+## Private function to read-in and parse rules of a given rulefile.
+#
+## The given file will be read, parsed and all valid rules will be stored by ID,
+## message/description and it's state in the snortrules hash.
+#
 sub readrulesfile ($) {
        my $rulefile = shift;