From: Ralph Boehme Date: Thu, 9 Sep 2021 16:15:51 +0000 (+0200) Subject: nmblookup: don't ignore unknown options X-Git-Tag: ldb-2.5.0~720 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98c977f44b6086e2c5cec52451078a6ade81d4a8;p=thirdparty%2Fsamba.git nmblookup: don't ignore unknown options BUG: https://bugzilla.samba.org/show_bug.cgi?id=14828 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/libcli/nbt/tools/nmblookup.c b/libcli/nbt/tools/nmblookup.c index 689240f90a4..6ca38faa863 100644 --- a/libcli/nbt/tools/nmblookup.c +++ b/libcli/nbt/tools/nmblookup.c @@ -433,6 +433,11 @@ int main(int argc, const char *argv[]) case OPT_CASE_SENSITIVE: options.case_sensitive = true; break; + case POPT_ERROR_BADOPT: + fprintf(stderr, "\nInvalid option %s: %s\n\n", + poptBadOption(pc, 0), poptStrerror(opt)); + poptPrintUsage(pc, stderr, 0); + exit(1); } }