From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] ids-functions.pl: Do not delete the whitelist file on rulesdir cleanup. Date: Fri, 24 May 2019 17:45:33 +0200 Message-ID: <20190524154533.4697-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0578626404678250384==" List-Id: --===============0578626404678250384== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Fixes #12087. Signed-off-by: Stefan Schantl --- config/cfgroot/ids-functions.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index deb287bb7..a52440f35 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -582,6 +582,9 @@ sub _cleanup_rulesdir() { # Skip element if it has config as file extension. next if ($file =3D~ m/\.config$/); =20 + # 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"; --=20 2.20.1 --===============0578626404678250384==--