ids-functions.pl: Extract rules files if they are in a providers rules folder.

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@ipfire.org>
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org>
This commit is contained in:
Stefan Schantl
2023-03-07 13:38:09 +01:00
committed by Peter Müller
parent a71ef763b0
commit c35974f87d

View File

@@ -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.
#