]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
unix-socket: return failure on failure
authorJason Ish <ish@unx.ca>
Tue, 4 Apr 2017 13:51:19 +0000 (07:51 -0600)
committerVictor Julien <victor@inliniac.net>
Thu, 6 Apr 2017 08:13:22 +0000 (10:13 +0200)
UnixManagerThreadInit needs to return a failure code if the socket
fails to initialize to avoid entering the UnixManager loop which
will continuously fail on the call to bind, as no listening
socket was setup.

This can occur when the socket fails to initialize due to a
permissions error and fatal init errors is not on.

src/unix-manager.c

index 702b63d46fdb228eb778e5a6bd311aa86394058c..5f9a0e49fb0948efe28996f45b30e0ed46c4ef81 100644 (file)
@@ -914,7 +914,7 @@ static TmEcode UnixManagerThreadInit(ThreadVars *t, void *initdata, void **data)
         } else {
             SCLogWarning(SC_ERR_INITIALIZATION,
                     "Unable to create unix command socket");
-            return TM_ECODE_OK;
+            return TM_ECODE_FAILED;
         }
     }