From: Eric Leblond Date: Sat, 4 Nov 2017 15:06:16 +0000 (-0400) Subject: suricata: init output before detection X-Git-Tag: suricata-4.1.0-beta1~241 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a2431a2fb2813cf5aeb13f5ec1807d4e7d66012;p=thirdparty%2Fsuricata.git 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. --- diff --git a/src/suricata.c b/src/suricata.c index dd9de573dc..b3595d23c5 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -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