1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

auth:creds: Fix cli_credentials_get_password_and_obtained() with callback

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15532

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andreas Schneider 2023-12-06 13:06:42 +01:00 committed by Andrew Bartlett
parent ab4b25964a
commit 1041dae03f
2 changed files with 3 additions and 2 deletions

View File

@ -465,11 +465,13 @@ _PUBLIC_ const char *
cli_credentials_get_password_and_obtained(struct cli_credentials *cred,
enum credentials_obtained *obtained)
{
const char *password = cli_credentials_get_password(cred);
if (obtained != NULL) {
*obtained = cred->password_obtained;
}
return cli_credentials_get_password(cred);
return password;
}
/* Set a password on the credentials context, including an indication

View File

@ -1 +0,0 @@
^samba.unittests.credentials.torture_creds_password_callback.none