From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] ids-functions.pl: Extract rules files if they are in a providers rules folder. Date: Tue, 07 Mar 2023 13:38:09 +0100 Message-ID: <20230307123809.8181-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9221005648040055573==" List-Id: --===============9221005648040055573== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 =3D~ m/\.rules$/) { # Skip rule files which are not located in the rules directory or archiv= e root. - next unless(($packed_file =3D~ /^rules\//) || ($packed_file !~ /\//)); + next unless(($packed_file =3D~ /^rules\//) || ($packed_file =3D~ /^$prov= ider-rules\//) || ($packed_file !~ /\//)); =20 # Skip deleted.rules. # --=20 2.30.2 --===============9221005648040055573==--