From: Stefan Schantl Date: Fri, 24 May 2019 15:45:33 +0000 (+0200) Subject: ids-functions.pl: Do not delete the whitelist file on rulesdir cleanup. X-Git-Tag: v2.23-core133~68^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fefb5173cf02c6b94f2f199bb342df550752ade0;p=ipfire-2.x.git ids-functions.pl: Do not delete the whitelist file on rulesdir cleanup. Fixes #12087. Signed-off-by: Stefan Schantl Signed-off-by: Arne Fitzenreiter --- diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index 5530da11eb..88734a3caa 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -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";