From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: Re: [PATCH] ids-functions.pl: Extract rules files if they are in a providers rules folder. Date: Tue, 07 Mar 2023 20:02:26 +0100 Message-ID: <3ab47620-ff68-b04a-563a-edfdcec5b831@ipfire.org> In-Reply-To: <20230307123809.8181-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6128705769407365699==" List-Id: --===============6128705769407365699== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Reviewed-by: Adolf Belka On 07/03/2023 13:38, Stefan Schantl wrote: > Now the rules files in a subfolder like "-rules" also will get > extracted. > > Fixes rule file extraction for Snort Community ruleset. > > Fixes #12948. > > Signed-off-by: Stefan Schantl > --- > config/cfgroot/ids-functions.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/config/cfgroot/ids-functions.pl > b/config/cfgroot/ids-functions.pl > index ec4fdacc5..d97431b4a 100644 > --- a/config/cfgroot/ids-functions.pl > +++ b/config/cfgroot/ids-functions.pl > @@ -572,7 +572,7 @@ sub extractruleset ($) { > # Handle rules files. > } elsif ($file =~ m/\.rules$/) { > # Skip rule files which are not located in the rules directory or > archive root. > - next unless(($packed_file =~ /^rules\//) || ($packed_file !~ /\//)); > + next unless(($packed_file =~ /^rules\//) || ($packed_file =~ > /^$provider-rules\//) || ($packed_file !~ /\//)); > # Skip deleted.rules. > # -- Sent from my laptop --===============6128705769407365699==--