]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
suricata: unix-socket mode and -l are compatible
authorEric Leblond <eric@regit.org>
Fri, 29 Jan 2021 22:59:11 +0000 (23:59 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 12 Feb 2021 13:52:32 +0000 (14:52 +0100)
Commit 93642a0d1dd29c96e98824935ef963f6b1ef40eb did prevent to
specify the logging directory on command line and use the unix
socket.

It looks like the implementation has evolved and the arbitrary
limitation can be removed allowing a user to start unix socket
without editing the configuration file.

src/suricata.c

index 4f054aeb1dbce1a13da5e63c23a06425eb0d74a0..4fc13d3b180dbc30518ddab2a0c37308c02b5da4 100644 (file)
@@ -1840,12 +1840,6 @@ static TmEcode ParseCommandLine(int argc, char** argv, SCInstance *suri)
         return TM_ECODE_FAILED;
     }
 
-    if ((suri->run_mode == RUNMODE_UNIX_SOCKET) && suri->set_logdir) {
-        SCLogError(SC_ERR_INITIALIZATION,
-                "can't use -l and unix socket runmode at the same time");
-        return TM_ECODE_FAILED;
-    }
-
     /* save the runmode from the commandline (if any) */
     suri->aux_run_mode = suri->run_mode;