From 9e0b596ab7612b11c61c13c1966b55c8b10cbb00 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 10 Sep 2021 07:21:31 +0200 Subject: s4/regdiff: don't ignore unknown options BUG: https://bugzilla.samba.org/show_bug.cgi?id=14828 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher (cherry picked from commit 5c75b5bdeb9b39843f115fe07f1a44689af3fcc5) --- source4/lib/registry/tools/regdiff.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source4/lib/registry/tools/regdiff.c b/source4/lib/registry/tools/regdiff.c index 299f0e96531..aab7b68944c 100644 --- a/source4/lib/registry/tools/regdiff.c +++ b/source4/lib/registry/tools/regdiff.c @@ -142,6 +142,11 @@ int main(int argc, char **argv) remote2 = 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); } } -- cgit v1.2.1