mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-10 02:55:55 +02:00
ids-functions.pl: Do not delete the whitelist file on rulesdir cleanup.
Fixes #12087. Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
committed by
Arne Fitzenreiter
parent
d0db7550ed
commit
fefb5173cf
@@ -572,6 +572,9 @@ sub _cleanup_rulesdir() {
|
||||
# Skip element if it has config as file extension.
|
||||
next if ($file =~ m/\.config$/);
|
||||
|
||||
# Skip rules file for whitelisted hosts.
|
||||
next if ("$rulespath/$file" eq $whitelist_file);
|
||||
|
||||
# Delete the current processed file, if not, exit this function
|
||||
# and return an error message.
|
||||
unlink("$rulespath/$file") or return "Could not delete $rulespath/$file. $!\n";
|
||||
|
||||
Reference in New Issue
Block a user