From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] ids-functions.pl: Do not longer extract all rulefiles in archive. Date: Sun, 13 Mar 2022 20:27:25 +0100 Message-ID: <20220313192725.3955-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1618788729328481318==" List-Id: --===============1618788729328481318== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Only extract rulefiles which are located in a rules directory and/or in the a= rchive root. This prevents us from extracting experimental or binary rules etc. which often are located in corresponding sub-directories. Reference: #12794. 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 7223e6bea..2736363a5 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -533,6 +533,9 @@ sub extractruleset ($) { =20 # 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 !~ /\//)); + my $rulesfilename; =20 # Splitt the filename into chunks. --=20 2.30.2 --===============1618788729328481318==--