From 6845051266a785bc26356e296bd716162e8a133e Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 10 Sep 2021 05:50:07 +0200 Subject: [PATCH] s4/smbclient: don't ignore unknown options BUG: https://bugzilla.samba.org/show_bug.cgi?id=14828 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- source4/client/client.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source4/client/client.c b/source4/client/client.c index f7c14e009d1..c961965ec4c 100644 --- a/source4/client/client.c +++ b/source4/client/client.c @@ -3460,6 +3460,11 @@ int main(int argc, char *argv[]) case 'b': ctx->io_bufsize = MAX(1, atoi(poptGetOptArg(pc))); break; + case POPT_ERROR_BADOPT: + fprintf(stderr, "\nInvalid option %s: %s\n\n", + poptBadOption(pc, 0), poptStrerror(opt)); + poptPrintUsage(pc, stderr, 0); + exit(1); } } -- 2.34.1