From 72a6cf1a8a2903518488cff1bdadd001c5b0b281 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 10 Sep 2021 07:05:58 +0200 Subject: log2pcaphex: don't ignore unknown options BUG: https://bugzilla.samba.org/show_bug.cgi?id=14828 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- source3/utils/log2pcaphex.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/utils') diff --git a/source3/utils/log2pcaphex.c b/source3/utils/log2pcaphex.c index f8b5246a43e..2ee2f82af98 100644 --- a/source3/utils/log2pcaphex.c +++ b/source3/utils/log2pcaphex.c @@ -334,6 +334,11 @@ int main(int argc, const char **argv) while((opt = poptGetNextOpt(pc)) != -1) { switch (opt) { + case POPT_ERROR_BADOPT: + fprintf(stderr, "\nInvalid option %s: %s\n\n", + poptBadOption(pc, 0), poptStrerror(opt)); + poptPrintUsage(pc, stderr, 0); + exit(1); } } -- cgit v1.2.1