diff options
author | Ralph Boehme <slow@samba.org> | 2021-09-09 18:14:36 +0200 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2021-09-10 15:10:30 +0000 |
commit | c87cc09315a169300e57a58b88587e54fcf29d8f (patch) | |
tree | 7509911722e7d159068f37ac0361fe47a23fd06e /lib/texpect | |
parent | d179c4f49b37dbcd04197b8cc31933e19dd8ac9a (diff) | |
download | samba-c87cc09315a169300e57a58b88587e54fcf29d8f.tar.gz |
texpect: don't ignore unknown options
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14828
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib/texpect')
-rw-r--r-- | lib/texpect/texpect.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/texpect/texpect.c b/lib/texpect/texpect.c index 5657efa44d1..1a6ebf486ae 100644 --- a/lib/texpect/texpect.c +++ b/lib/texpect/texpect.c @@ -388,7 +388,13 @@ int main(int argc, const char **argv) } while ((optidx = poptGetNextOpt(pc)) != -1) { - ;; + switch (optidx) { + case POPT_ERROR_BADOPT: + fprintf(stderr, "\nInvalid option %s: %s\n\n", + poptBadOption(pc, 0), poptStrerror(optidx)); + poptPrintUsage(pc, stderr, 0); + exit(1); + } } instruction_file = poptGetArg(pc); |