diff --git a/auth/credentials/credentials.c b/auth/credentials/credentials.c index ab5efd90f26..b9da77c6b84 100644 --- a/auth/credentials/credentials.c +++ b/auth/credentials/credentials.c @@ -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 diff --git a/selftest/knownfail.d/creds b/selftest/knownfail.d/creds deleted file mode 100644 index 09491f22c65..00000000000 --- a/selftest/knownfail.d/creds +++ /dev/null @@ -1 +0,0 @@ -^samba.unittests.credentials.torture_creds_password_callback.none