]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
unix-socket: don't error out on unix socket failure
authorVictor Julien <victor@inliniac.net>
Thu, 1 Dec 2016 13:54:04 +0000 (14:54 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 1 Dec 2016 13:54:04 +0000 (14:54 +0100)
If --init-errors-fatal is specified do error out.

Bug https://redmine.openinfosecfoundation.org/issues/1973

src/unix-manager.c

index d1959684c5bcfee5fdc2e6bd6cc707613382d8f2..71ef3802ffcc40374470c1545a1b252a9317df25 100644 (file)
@@ -908,16 +908,18 @@ static TmEcode UnixManagerThreadInit(ThreadVars *t, void *initdata, void **data)
 
     if (UnixNew(&command) == 0) {
         int failure_fatal = 0;
-        SCLogError(SC_ERR_INITIALIZATION,
-                   "Unable to create unix command socket");
         if (ConfGetBool("engine.init-failure-fatal", &failure_fatal) != 1) {
             SCLogDebug("ConfGetBool could not load the value.");
         }
         SCFree(utd);
         if (failure_fatal) {
+            SCLogError(SC_ERR_INITIALIZATION,
+                    "Unable to create unix command socket");
             exit(EXIT_FAILURE);
         } else {
-            return TM_ECODE_FAILED;
+            SCLogWarning(SC_ERR_INITIALIZATION,
+                    "Unable to create unix command socket");
+            return TM_ECODE_OK;
         }
     }