credentials: Improve error message on failure to set machine account password
authorAndrew Bartlett <abartlet@samba.org>
Thu, 2 Oct 2014 16:14:56 +0000 (05:14 +1300)
committerStefan Metzmacher <metze@samba.org>
Thu, 18 Dec 2014 09:46:12 +0000 (10:46 +0100)
Change-Id: I4136067d6d0e5cfe92770a2e7efa39f4ebcb2aca
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 89daf5dc534ab03724a2622d3b6b4d6783756bae)

auth/credentials/credentials_secrets.c

index 4f2aeb585c08bd53657ebe945deebf82ebd4e804..8607973d71d7842818a5add39325d25468e78122 100644 (file)
@@ -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 "