1
0
mirror of https://github.com/samba-team/samba.git synced 2025-09-03 05:49:28 +03:00

Return the 'freindly' NT error message if at all possible.

Andrew Bartlett
(This used to be commit 90d0517653)
This commit is contained in:
Andrew Bartlett
2003-01-11 03:25:31 +00:00
parent 674c750df7
commit f9d66d10c2
2 changed files with 3 additions and 2 deletions

View File

@@ -121,7 +121,8 @@ static int pam_winbind_request(enum winbindd_cmd req_type,
/* Copy reply data from socket */ /* Copy reply data from socket */
if (response->result != WINBINDD_OK) { if (response->result != WINBINDD_OK) {
if (response->data.auth.pam_error != PAM_SUCCESS) { 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.pam_error,
response->data.auth.nt_status_string); response->data.auth.nt_status_string);
return response->data.auth.pam_error; return response->data.auth.pam_error;

View File

@@ -142,7 +142,7 @@ done:
state->response.data.auth.nt_status = NT_STATUS_V(result); 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.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); 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", DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("Plain-text authentication for user %s returned %s (PAM: %d)\n",