[Oisf-users] Segmentation fault (core dumped) when setting configuration value with commandline arguments

Jason Ish lists at unx.ca
Tue Jan 5 15:38:23 UTC 2016


On Tue, Jan 5, 2016 at 8:15 AM, Victor Julien <lists at inliniac.net> wrote:
> On 05-01-16 14:52, Andreas Moe wrote:
>> suricata -c /etc/suricata/suricata.yaml -i eth0 --set
>> logging.outputs.file.enabled=yes --set
>> logging.outputs.filename=/tmp/suricata.log --set logging.outputs.format=json
>
> This is enough to reproduce it here.
>
> The problem is that lists are a bit tricky when using --set. This should
> work:
>
> suricata -c /etc/suricata/suricata.yaml -i eth0 --set
> logging.outputs.1.file.enabled=yes --set
> logging.outputs.1.file.filename=/tmp/suricata.log --set
> logging.outputs.1.file.type=json

I like to think of it as lists and --set being incompatible, not just tricky.

See: https://github.com/inliniac/suricata/pull/1749

Where my suggested fix is to bail when this case is seen.  I do have
another thought in that PR that I haven't tried out yet but would
consider looking at again.

Often this happens when something was defined as a list in YAML when
it probably shouldn't have been a list, but I think it makes sense for
logging.outputs to be a list here.

Jason



More information about the Oisf-users mailing list