From: Jason Ish Date: Tue, 4 Apr 2017 13:51:19 +0000 (-0600) Subject: unix-socket: return failure on failure X-Git-Tag: suricata-4.0.0-beta1~232 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff30d924db83734e395c946b84289e30f1e03d49;p=thirdparty%2Fsuricata.git unix-socket: return failure on failure 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. --- diff --git a/src/unix-manager.c b/src/unix-manager.c index 702b63d46f..5f9a0e49fb 100644 --- a/src/unix-manager.c +++ b/src/unix-manager.c @@ -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; } }