From: Stefan Schantl Date: Fri, 2 Apr 2021 08:05:12 +0000 (+0200) Subject: ids.cgi: Handle oinkmaster provider includes when deleting a provider. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c5b2f6da301b5409b79df391f0f73e6c576fcf6;p=people%2Fstevee%2Fipfire-2.x.git ids.cgi: Handle oinkmaster provider includes when deleting a provider. Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 8a2afd9061..927890ab52 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -890,6 +890,19 @@ if ($cgiparams{'RULESET'} eq $Lang::tr{'ids apply'}) { # Drop the file, it is not longer needed. unlink("$provider_used_rulefile"); + # Call function to get the path and name for the given providers + # oinkmaster modified sids file. + my $provider_modified_sids_file = &IDS::get_oinkmaster_provider_modified_sids_file($provider); + + # Check if the file exists. + if (-f $provider_modified_sids_file) { + # Remove the file, which is not longer needed. + unlink("$provider_modified_sids_file"); + } + + # Alter the oinkmaster provider includes file and remove the provider. + &IDS::alter_oinkmaster_provider_includes_file("remove", $provider); + # Regenerate ruleset. &IDS::oinkmaster();