]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
suricata: init output before detection
authorEric Leblond <eric@regit.org>
Sat, 4 Nov 2017 15:06:16 +0000 (11:06 -0400)
committerJason Ish <ish@unx.ca>
Wed, 31 Jan 2018 12:33:28 +0000 (06:33 -0600)
As we need to know if we should parse the signature metadata, we
have to parse the output configuration before initializing the
detection engine.

src/suricata.c

index dd9de573dcf56c19e76c7c690e0d8efe7d97e7be..b3595d23c5e62e2fd226ca552eb8f6b3d5105d6d 100644 (file)
@@ -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