From a81b814b7df43de2106cfdbc9453c6d8e3394403 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 3 Oct 2014 05:14:56 +1300 Subject: [PATCH] credentials: Improve error message on failure to set machine account password Change-Id: I4136067d6d0e5cfe92770a2e7efa39f4ebcb2aca Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher (cherry picked from commit 89daf5dc534ab03724a2622d3b6b4d6783756bae) --- auth/credentials/credentials_secrets.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/auth/credentials/credentials_secrets.c b/auth/credentials/credentials_secrets.c index 4f2aeb585c0..8607973d71d 100644 --- a/auth/credentials/credentials_secrets.c +++ b/auth/credentials/credentials_secrets.c @@ -339,10 +339,12 @@ _PUBLIC_ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cr status = NT_STATUS_OK; } else if (!NT_STATUS_IS_OK(status)) { if (db_ctx) { - error_string = talloc_asprintf(cred, - "Failed to fetch machine account password from " - "secrets.ldb: %s and failed to fetch %s from %s", - error_string, keystr_upper, secrets_tdb); + error_string + = talloc_asprintf(cred, + "Failed to fetch machine account password for %s from both " + "secrets.ldb (%s) and from %s", + domain, error_string, + dbwrap_name(db_ctx)); } else { error_string = talloc_asprintf(cred, "Failed to fetch machine account password from " -- 2.34.1