summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-01-11 03:25:31 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-01-11 03:25:31 +0000
commitf9d66d10c236558c20a28f4caae3c6b4e2516fa9 (patch)
treeab004bb2f9ac59e14e43b8ac970f91b9159a8261
parent674c750df7f3725d460631c3200f284767bbb6cf (diff)
downloadsamba-f9d66d10c236558c20a28f4caae3c6b4e2516fa9.tar.gz
samba-f9d66d10c236558c20a28f4caae3c6b4e2516fa9.tar.bz2
samba-f9d66d10c236558c20a28f4caae3c6b4e2516fa9.zip
Return the 'freindly' NT error message if at all possible.
Andrew Bartlett (This used to be commit 90d05176534cfd97ed3827bddfeb3a0cb7f22683)
-rw-r--r--source3/nsswitch/pam_winbind.c3
-rw-r--r--source3/nsswitch/winbindd_pam.c2
2 files changed, 3 insertions, 2 deletions
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",