From: Stefan Schantl Date: Sun, 20 Mar 2022 14:47:52 +0000 (+0100) Subject: ids-functions.pl: Replace call of external oinkmaster.pl to newly X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=794469483f26e514e13648a07483d19e2372ecb7;p=people%2Fstevee%2Fipfire-2.x.git ids-functions.pl: Replace call of external oinkmaster.pl to newly introduced process_ruleset function. Signed-off-by: Stefan Schantl --- diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index 1e3cd44030..d318f464a2 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -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() { - # 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);