diff --git a/CHANGES b/CHANGES index da2369ccca..748ec4c94d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,9 @@ +4.2.0-dev.92 | 2021-08-31 15:55:29 +0200 + + * Allow `-B` flag in non-debug builds, but ignore it (unless it's + `help`). (Benjamin Bannier, Corelight) + 4.2.0-dev.89 | 2021-08-26 14:35:28 -0700 * CI support refresh. (Christian Kreibich, Corelight) diff --git a/VERSION b/VERSION index 7fb9b05d77..c62d303525 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.2.0-dev.89 +4.2.0-dev.92 diff --git a/src/Options.cc b/src/Options.cc index d28c67b06e..347df2cef6 100644 --- a/src/Options.cc +++ b/src/Options.cc @@ -12,6 +12,8 @@ #endif #include +#include +#include #include #include "zeek/bsd-getopt-long.h" @@ -328,10 +330,7 @@ Options parse_cmdline(int argc, char** argv) {"watchdog", no_argument, nullptr, 'W'}, {"print-id", required_argument, nullptr, 'I'}, {"status-file", required_argument, nullptr, 'U'}, - -#ifdef DEBUG {"debug", required_argument, nullptr, 'B'}, -#endif #ifdef USE_PERFTOOLS_DEBUG {"mem-leaks", no_argument, nullptr, 'm'}, @@ -437,11 +436,17 @@ Options parse_cmdline(int argc, char** argv) rval.pcap_output_file = optarg; break; -#ifdef DEBUG case 'B': +#ifdef DEBUG rval.debug_log_streams = optarg; - break; +#else + if ( util::streq(optarg, "help") ) + { + fprintf(stderr,"debug streams unavailable\n"); + exit(1); + } #endif + break; case 'C': rval.ignore_checksums = true;