1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +03:00

lib/cmdline: only call cli_credentials_get_password_and_obtained if needed

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:
Stefan Metzmacher 2022-04-14 13:31:20 +02:00
parent 994e12e8f7
commit 0ba9e5dacb

View File

@ -837,8 +837,10 @@ static void popt_common_credentials_callback(poptContext popt_ctx,
CRED_SPECIFIED);
}
(void)cli_credentials_get_password_and_obtained(creds,
&password_obtained);
if (!skip_password_callback) {
(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);