From: Stefan Schantl Date: Fri, 2 Apr 2021 11:47:36 +0000 (+0200) Subject: ids-functions.pl: Only read providers used rulefiles file if it exists. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=01fc880cf3d6a19d1c2809f9adecd78278ebb49a;p=people%2Fstevee%2Fipfire-2.x.git ids-functions.pl: Only read providers used rulefiles file if it exists. Signed-off-by: Stefan Schantl --- diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index f95a02ddd4..7a36615404 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -1694,8 +1694,8 @@ sub read_used_provider_rulesfiles($) { # Get the used rulesefile file for the provider. my $rulesfile_file = &get_used_provider_rulesfile_file($provider); - # Check if the used rulesfile is empty. - unless (-z $rulesfile_file) { + # Check if the a used rulesfile exists for this provider. + if (-f $rulesfile_file) { # Open the file or used rulefiles and read-in content. open(FILE, $rulesfile_file) or die "Could not open $rulesfile_file. $!\n";