public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH] ids-functions.pl: Extract rules files if they are in a providers rules folder.
@ 2023-03-07 12:38 Stefan Schantl
  2023-03-07 19:02 ` Adolf Belka
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Schantl @ 2023-03-07 12:38 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 957 bytes --]

Now the rules files in a subfolder like "<provider>-rules" also will get
extracted.

Fixes rule file extraction for Snort Community ruleset.

Fixes #12948.

Signed-off-by: Stefan Schantl <stefan.schantl(a)ipfire.org>
---
 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.
 				#
-- 
2.30.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-07 19:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-07 12:38 [PATCH] ids-functions.pl: Extract rules files if they are in a providers rules folder Stefan Schantl
2023-03-07 19:02 ` Adolf Belka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox