public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH] ids-functions.pl: Rework cleanup rulesdir logic
@ 2026-10-05 18:36 Stefan Schantl
  0 siblings, 0 replies; only message in thread
From: Stefan Schantl @ 2026-10-05 18:36 UTC (permalink / raw)
  To: development; +Cc: Stefan Schantl

Never drop any of the statically included rulefiles instead of specify
them one by one.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 config/cfgroot/ids-functions.pl | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl
index 93d1acdee..4c03926d7 100644
--- a/config/cfgroot/ids-functions.pl
+++ b/config/cfgroot/ids-functions.pl
@@ -1086,11 +1086,8 @@ sub _cleanup_rulesdir() {
 		# We only want files.
 		next unless (-f "$rulespath/$file");
 
-		# Skip rules file for whitelisted hosts.
-		next if ("$rulespath/$file" eq $whitelist_file);
-
-		# Skip rules file with local rules.
-		next if ("$rulespath/$file" eq $local_rules_file);
+		# Skip any files which are part of the array of statically included rulefiles.
+		next if (grep(/$file/, @static_included_rulefiles));
 
 		# Delete the current processed file, if not, exit this function
 		# and return an error message.
-- 
2.47.3



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-05 18:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-05 18:36 [PATCH] ids-functions.pl: Rework cleanup rulesdir logic Stefan Schantl

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