]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
ids.cgi: Handle oinkmaster provider includes when deleting a provider.
authorStefan Schantl <stefan.schantl@ipfire.org>
Fri, 2 Apr 2021 08:05:12 +0000 (10:05 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 19 Dec 2021 12:23:43 +0000 (13:23 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/ids.cgi

index 8a2afd90612c1cf65454d9e48a5441b6486a4860..927890ab522d999ea4a55cf5adad1807f774f8e2 100644 (file)
@@ -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();