mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 03:33:25 +02:00
ids-functions.pl: Add get_ruleset_providers() function.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
@@ -112,6 +112,24 @@ sub check_and_create_filelayout() {
|
||||
unless (-f "$whitelist_file" ) { &create_empty_file($whitelist_file); }
|
||||
}
|
||||
|
||||
#
|
||||
## Function to get a list of all available ruleset providers.
|
||||
##
|
||||
## They will be returned as a sorted array.
|
||||
#
|
||||
sub get_ruleset_providers() {
|
||||
my @providers;
|
||||
|
||||
# Loop through the hash of providers.
|
||||
foreach my $provider ( keys %IDS::Ruleset::Providers ) {
|
||||
# Add the provider to the array.
|
||||
push(@providers, $provider);
|
||||
}
|
||||
|
||||
# Sort and return the array.
|
||||
return sort(@providers);
|
||||
}
|
||||
|
||||
#
|
||||
## Function for checking if at least 300MB of free disk space are available
|
||||
## on the "/var" partition.
|
||||
|
||||
Reference in New Issue
Block a user