From: Victor Julien Date: Mon, 6 Jan 2014 13:09:35 +0000 (+0100) Subject: Error out if -s/-S are used with disable detect X-Git-Tag: suricata-2.0rc1~151 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6a3621f2fe3bee73752861870f5e7be6c17f0f0f;p=thirdparty%2Fsuricata.git Error out if -s/-S are used with disable detect When Suricata is started with --disabled-detection, the -s and -S options make no sense. So error out. --- diff --git a/src/suricata.c b/src/suricata.c index 09404c4cb8..f5ad18581b 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -1523,6 +1523,11 @@ static TmEcode ParseCommandLine(int argc, char** argv, SCInstance *suri) } } + if (suri->disabled_detect && suri->sig_file != NULL) { + SCLogError(SC_ERR_INITIALIZATION, "can't use -s/-S when detection is disabled"); + return TM_ECODE_FAILED; + } + if (list_app_layer_protocols) suri->run_mode = RUNMODE_LIST_APP_LAYERS; if (list_cuda_cards)