]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
ids-functions.pl: Replace call of external oinkmaster.pl to newly
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 20 Mar 2022 14:47:52 +0000 (15:47 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sat, 26 Mar 2022 10:35:48 +0000 (11:35 +0100)
introduced process_ruleset function.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/cfgroot/ids-functions.pl

index 1e3cd4403055efa86a3d01def7e3b04de26102c8..d318f464a2eb47bf4f919c7252ea099f764d0535 100644 (file)
@@ -650,27 +650,8 @@ sub oinkmaster () {
                &extractruleset($provider);
        }
 
-       # Establish the connection to the syslog service.
-       openlog('oinkmaster', 'cons,pid', 'user');
-
-       # Call oinkmaster to generate ruleset.
-       open(OINKMASTER, "/usr/local/bin/oinkmaster.pl -s -u dir://$tmp_rules_directory -C $settingsdir/oinkmaster.conf -o $rulespath 2>&1 |") or die "Could not execute oinkmaster $!\n";
-
-       # Log output of oinkmaster to syslog.
-       while(<OINKMASTER>) {
-               # The syslog function works best with an array based input,
-               # so generate one before passing the message details to syslog.
-               my @syslog = ("INFO", "$_");
-
-               # Send the log message.
-               syslog(@syslog);
-       }
-
-       # Close the pipe to oinkmaster process.
-       close(OINKMASTER);
-
-       # Close the log handle.
-       closelog();
+       # Call function to process the ruleset and do all modifications.
+       &process_ruleset(@enabled_providers);
 
        # Call function to merge the classification files.
        &merge_classifications(@enabled_providers);