It is not possible to use simultaneously -l and unix socket
runmode because setting the log directory make it final so
not modifable by other call.
It is a implementation limitation but it does not make sense
to set logging directory to have it overwritten by the first
directory specified 'by pcap-file'. So it seems correct to
only trigger an error if this both options are used at the same
time.
int build_info = 0;
int conf_test = 0;
int engine_analysis = 0;
+ int set_log_directory = 0;
int ret = TM_ECODE_OK;
#ifdef UNITTESTS
"exist. Shutting down the engine.", optarg, optarg);
return TM_ECODE_FAILED;
}
+ set_log_directory = 1;
+
break;
case 'q':
#ifdef NFQ
return TM_ECODE_FAILED;
}
+ if ((suri->run_mode == RUNMODE_UNIX_SOCKET) && set_log_directory) {
+ SCLogError(SC_ERR_INITIALIZATION, "can't use -l and unix socket runmode at the same time");
+ return TM_ECODE_FAILED;
+ }
+
if (list_app_layer_protocols)
suri->run_mode = RUNMODE_LIST_APP_LAYERS;
if (list_cuda_cards)