Project

General

Profile

Actions

Bug #2851

closed
SM

suricata-update doesn't properly load some sections in update.yaml file

Bug #2851: suricata-update doesn't properly load some sections in update.yaml file

Added by Srinath M. about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Affected Versions:
Effort:
low
Difficulty:
low
Label:
Beginner, Outreachy

Description

I'm setting the following in the update.yaml file

ignore:
  - "*deleted.rules" 
  - "*pop3.rules" 

I get the loading message:

26/2/2019 -- 13:46:04 - <Debug> -- This is suricata-update version 1.0.3 (rev: None); Python: 2.7.15rc1 (default, Nov 12 2018, 14:31:15) - [GCC 7.3.0]
26/2/2019 -- 13:46:04 - <Info> -- Loading /opt/suricata/etc/suricata/update.yaml

But the files do not get ignored. It seems that the code loading command line parameters override previous settings even when no parameters are given.
The problem seems to be that the default for the --ignore flag is "[]" and not "None"

Changing line 182 in config.py file seems to solve the issue.

From:

        elif getattr(args, arg) is not None:

To:

        elif getattr(args, arg) not in [ None, [] ]:

SB Updated by Shivani Bhardwaj about 7 years ago Actions #1

  • Assignee deleted (Jason Ish)

SB Updated by Shivani Bhardwaj about 7 years ago Actions #2

  • Label Beginner, Outreachy added

SB Updated by Shivani Bhardwaj about 7 years ago Actions #3

  • Status changed from New to Assigned
  • Assignee set to Victor Julien

SB Updated by Shivani Bhardwaj about 7 years ago Actions #4

  • Assignee deleted (Victor Julien)

SB Updated by Shivani Bhardwaj about 7 years ago Actions #5

  • Status changed from Assigned to Closed
  • Target version set to 1.0.5
Actions

Also available in: PDF Atom