From e41ee3e0f24cb89b20a758e2281531ed76577ef4 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Fri, 22 Apr 2022 05:31:28 +0200 Subject: [PATCH] ids-functions.pl: Avoid suricata from loading rulesfiles of an unsupported provider. Modify the write_used_rulefiles_file() function to skip the rulesfiles of unsupported providers. Signed-off-by: Stefan Schantl --- config/cfgroot/ids-functions.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index f6627ba2bf..3994d17808 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -1484,6 +1484,9 @@ sub write_used_rulefiles_file (@) { # Loop through the array of enabled providers. foreach my $provider (@providers) { + # Skip unsupported providers. + next unless ($IDS::Ruleset::Providers{$provider}); + # Get the used rulefile for this provider. my @used_rulesfiles = &get_provider_used_rulesfiles($provider); -- 2.39.2