mirror of
https://github.com/samba-team/samba.git
synced 2025-01-18 06:04:06 +03:00
lib/cmdline: move cli_credentials_set_cmdline_callbacks to the end of POPT_CALLBACK_REASON_POST
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15018 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
e2170431f1
commit
994e12e8f7
@ -803,19 +803,6 @@ static void popt_common_credentials_callback(poptContext popt_ctx,
|
|||||||
"Unable to read defaults from smb.conf\n");
|
"Unable to read defaults from smb.conf\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
(void)cli_credentials_get_password_and_obtained(creds,
|
|
||||||
&password_obtained);
|
|
||||||
if (!skip_password_callback &&
|
|
||||||
password_obtained < CRED_CALLBACK) {
|
|
||||||
ok = cli_credentials_set_cmdline_callbacks(creds);
|
|
||||||
if (!ok) {
|
|
||||||
fprintf(stderr,
|
|
||||||
"Failed to set cmdline password "
|
|
||||||
"callback\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (machine_account_pending) {
|
if (machine_account_pending) {
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
|
||||||
@ -850,6 +837,19 @@ static void popt_common_credentials_callback(poptContext popt_ctx,
|
|||||||
CRED_SPECIFIED);
|
CRED_SPECIFIED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(void)cli_credentials_get_password_and_obtained(creds,
|
||||||
|
&password_obtained);
|
||||||
|
if (!skip_password_callback &&
|
||||||
|
password_obtained < CRED_CALLBACK) {
|
||||||
|
ok = cli_credentials_set_cmdline_callbacks(creds);
|
||||||
|
if (!ok) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"Failed to set cmdline password "
|
||||||
|
"callback\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user