suricata: init output before detection

As we need to know if we should parse the signature metadata, we
have to parse the output configuration before initializing the
detection engine.
pull/3205/head
Eric Leblond 9 years ago committed by Jason Ish
parent 6bf00ab289
commit 3a2431a2fb

@ -2842,11 +2842,12 @@ int main(int argc, char **argv)
if (PostConfLoadedSetup(&suricata) != TM_ECODE_OK) {
exit(EXIT_FAILURE);
}
PostConfLoadedDetectSetup(&suricata);
SCDropMainThreadCaps(suricata.userid, suricata.groupid);
PreRunPostPrivsDropInit(suricata.run_mode);
PostConfLoadedDetectSetup(&suricata);
if (suricata.run_mode == RUNMODE_CONF_TEST){
SCLogNotice("Configuration provided was successfully loaded. Exiting.");
#ifdef HAVE_MAGIC

Loading…
Cancel
Save