From: Ralph Boehme Date: Fri, 10 Sep 2021 05:12:57 +0000 (+0200) Subject: smbget: don't ignore unknown options X-Git-Tag: ldb-2.5.0~703 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d841457aedd8715ceacb20af8f1ae42cbf8ebf49;p=thirdparty%2Fsamba.git smbget: 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/source3/utils/smbget.c b/source3/utils/smbget.c index 250f02efec4..19958f35afa 100644 --- a/source3/utils/smbget.c +++ b/source3/utils/smbget.c @@ -974,6 +974,11 @@ int main(int argc, char **argv) case 'v': opt.verbose = true; break; + case POPT_ERROR_BADOPT: + fprintf(stderr, "\nInvalid option %s: %s\n\n", + poptBadOption(pc, 0), poptStrerror(c)); + poptPrintUsage(pc, stderr, 0); + exit(1); } }