mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
pdbtest: 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>
This commit is contained in:
parent
6afa1b3485
commit
e3c5516dc5
@ -554,6 +554,7 @@ int main(int argc, const char **argv)
|
||||
struct samu *in = NULL;
|
||||
NTSTATUS rv;
|
||||
int i;
|
||||
int opt;
|
||||
struct timeval tv;
|
||||
bool error = False;
|
||||
struct passwd *pwd;
|
||||
@ -593,7 +594,15 @@ int main(int argc, const char **argv)
|
||||
|
||||
poptSetOtherOptionHelp(pc, "backend[:settings] username");
|
||||
|
||||
while(poptGetNextOpt(pc) != -1);
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user