Skip to content

Commit

Permalink
s4/regshell: don't ignore unknown options
Browse files Browse the repository at this point in the history
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14828

Signed-off-by: Ralph Boehme <[email protected]>
Reviewed-by: Stefan Metzmacher <[email protected]>
  • Loading branch information
slowfranklin committed Sep 10, 2021
1 parent 604ce3d commit ac86779
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source4/lib/registry/tools/regshell.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,13 @@ int main(int argc, char **argv)
}

while((opt = poptGetNextOpt(pc)) != -1) {
switch (opt) {
case POPT_ERROR_BADOPT:
fprintf(stderr, "\nInvalid option %s: %s\n\n",
poptBadOption(pc, 0), poptStrerror(opt));
poptPrintUsage(pc, stderr, 0);
exit(1);
}
}

poptFreeContext(pc);
Expand Down

0 comments on commit ac86779

Please sign in to comment.