From f9d66d10c236558c20a28f4caae3c6b4e2516fa9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 11 Jan 2003 03:25:31 +0000 Subject: Return the 'freindly' NT error message if at all possible. Andrew Bartlett (This used to be commit 90d05176534cfd97ed3827bddfeb3a0cb7f22683) --- source3/nsswitch/pam_winbind.c | 3 ++- source3/nsswitch/winbindd_pam.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/nsswitch') diff --git a/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c index 7d0353664f..123f670366 100644 --- a/source3/nsswitch/pam_winbind.c +++ b/source3/nsswitch/pam_winbind.c @@ -121,7 +121,8 @@ static int pam_winbind_request(enum winbindd_cmd req_type, /* Copy reply data from socket */ if (response->result != WINBINDD_OK) { if (response->data.auth.pam_error != PAM_SUCCESS) { - _pam_log(LOG_ERR, "request failed, PAM error was %d, NT error was %s", + _pam_log(LOG_ERR, "request failed: %s, PAM error was %d, NT error was %s", + response->data.auth.error_string, response->data.auth.pam_error, response->data.auth.nt_status_string); return response->data.auth.pam_error; diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c index 398b001f8b..844c44567b 100644 --- a/source3/nsswitch/winbindd_pam.c +++ b/source3/nsswitch/winbindd_pam.c @@ -142,7 +142,7 @@ done: state->response.data.auth.nt_status = NT_STATUS_V(result); fstrcpy(state->response.data.auth.nt_status_string, nt_errstr(result)); - fstrcpy(state->response.data.auth.error_string, nt_errstr(result)); + fstrcpy(state->response.data.auth.error_string, get_friendly_nt_error_msg(result)); state->response.data.auth.pam_error = nt_status_to_pam(result); DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("Plain-text authentication for user %s returned %s (PAM: %d)\n", -- cgit