Project

General

Profile

Actions

Bug #288

closed

Config "outputs" boolean parsing issue

Added by James Pleger over 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

I have a bug where if a boolean is set in the outputs configuration that isn't yes it sets to false.

This works(in config),
outputs:
- fast: {enabled: yes, filename: fast.log}

but this doesn't:
outputs:
- fast: {enabled: false, filename: fast.log}

I believe part of the problem exists on line 110 of runmodes.c in version 1.0.3

/** * Initialize the output modules.
*/
void RunModeInitializeOutputs(void) {
...
if (enabled != NULL && strcasecmp(enabled, "yes") == 0) {
To reproduce, change all the options in the outputs from "yes" to true.

Error:
[20946] 24/5/2011 -- 19:55:34 - (tm-threads.c:1416) <Error> (TmThreadWaitOnThreadInit) -- [ERRCODE: SC_ERR_THREAD_INIT(49)] - thread "Outputs" closed on initialization.
[20946] 24/5/2011 -- 19:55:34 - (suricata.c:1141) <Error> (main) -- [ERRCODE: SC_ERR_INITIALIZATION(45)] - Engine initialization failed, aborting...


Files

Actions

Also available in: Atom PDF