From: Ralph Boehme Date: Fri, 10 Sep 2021 05:11:07 +0000 (+0200) Subject: sharesec: don't ignore unknown options X-Git-Tag: ldb-2.5.0~706 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a2b4ba059809a1e16124bf448a9398822fe5c80;p=thirdparty%2Fsamba.git sharesec: 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/sharesec.c b/source3/utils/sharesec.c index cec1da1e94d..9b8064de702 100644 --- a/source3/utils/sharesec.c +++ b/source3/utils/sharesec.c @@ -515,6 +515,11 @@ int main(int argc, const char *argv[]) case OPT_VIEW_ALL: mode = SMB_ACL_VIEW_ALL; break; + case POPT_ERROR_BADOPT: + fprintf(stderr, "\nInvalid option %s: %s\n\n", + poptBadOption(pc, 0), poptStrerror(opt)); + poptPrintUsage(pc, stderr, 0); + exit(1); } }