1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

testparm: 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:
Ralph Boehme 2021-09-10 07:15:49 +02:00
parent b851d48277
commit ac292ec428

View File

@ -672,6 +672,7 @@ static void do_per_share_checks(int s)
const char *config_file = NULL;
const struct loadparm_substitution *lp_sub =
loadparm_s3_global_substitution();
int opt;
int s;
static int silent_mode = False;
static int show_all_parameters = False;
@ -776,7 +777,15 @@ static void do_per_share_checks(int s)
poptSetOtherOptionHelp(pc, "[OPTION...] <config-file> [host-name] [host-ip]");
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);
}
}
if (show_all_parameters) {
show_parameter_list();