]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
ids-functions.pl: Do not delete the whitelist file on rulesdir cleanup.
authorStefan Schantl <stefan.schantl@ipfire.org>
Fri, 24 May 2019 15:45:33 +0000 (17:45 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 26 May 2019 14:09:21 +0000 (16:09 +0200)
Fixes #12087.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/cfgroot/ids-functions.pl

index 5530da11eb1f6cddcfd98ab59cdc41e4a7a1804d..88734a3caababc80bf42d54384d49d980da55ca4 100644 (file)
@@ -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";