mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
ids-functions.pl: Also check and fix the permissions of rulespath
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
@@ -385,6 +385,12 @@ sub create_empty_file($) {
|
||||
## If not, call suricatactrl to fix them.
|
||||
#
|
||||
sub _check_rulesdir_permissions() {
|
||||
# Check if the rulepath main directory is writable.
|
||||
unless (-W $rulespath) {
|
||||
# If not call suricatctrl to fix it.
|
||||
&call_suricatactrl("fix-rules-dir");
|
||||
}
|
||||
|
||||
# Open snort rules directory and do a directory listing.
|
||||
opendir(DIR, $rulespath) or die $!;
|
||||
# Loop through the direcory.
|
||||
|
||||
Reference in New Issue
Block a user