diff options
author | Günther Deschner <gd@samba.org> | 2007-08-20 12:45:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:07 -0500 |
commit | b2ff8a26636abb49277630846bd7a2a6b9044ad8 (patch) | |
tree | 84a72852438742fadd7a4ef249f3ce403468f927 /source3 | |
parent | 42bb05074a9b9fac52635cd6242e5a915a85f724 (diff) | |
download | samba-b2ff8a26636abb49277630846bd7a2a6b9044ad8.tar.gz samba-b2ff8a26636abb49277630846bd7a2a6b9044ad8.tar.bz2 samba-b2ff8a26636abb49277630846bd7a2a6b9044ad8.zip |
r24579: Merge error reporting to the end of winbindd_pam_auth().
Guenther
(This used to be commit d5bd8b1d618828fe390ca76120863316606dc250)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/nsswitch/winbindd_pam.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c index 2c0017cbce..b0a14ae4e9 100644 --- a/source3/nsswitch/winbindd_pam.c +++ b/source3/nsswitch/winbindd_pam.c @@ -583,6 +583,7 @@ void winbindd_pam_auth(struct winbindd_cli_state *state) { struct winbindd_domain *domain; fstring name_domain, name_user; + NTSTATUS result; /* Ensure null termination */ state->request.data.auth.user @@ -601,30 +602,27 @@ void winbindd_pam_auth(struct winbindd_cli_state *state) if (!canonicalize_username(state->request.data.auth.user, name_domain, name_user)) { - set_auth_errors(&state->response, NT_STATUS_NO_SUCH_USER); - DEBUG(5, ("Plain text authentication for %s returned %s " - "(PAM: %d)\n", - state->request.data.auth.user, - state->response.data.auth.nt_status_string, - state->response.data.auth.pam_error)); - request_error(state); - return; + result = NT_STATUS_NO_SUCH_USER; + goto done; } domain = find_auth_domain(state, name_domain); if (domain == NULL) { - set_auth_errors(&state->response, NT_STATUS_NO_SUCH_USER); - DEBUG(5, ("Plain text authentication for %s returned %s " - "(PAM: %d)\n", - state->request.data.auth.user, - state->response.data.auth.nt_status_string, - state->response.data.auth.pam_error)); - request_error(state); - return; + result = NT_STATUS_NO_SUCH_USER; + goto done; } sendto_domain(state, domain); + return; + done: + set_auth_errors(&state->response, result); + DEBUG(5, ("Plain text authentication for %s returned %s " + "(PAM: %d)\n", + state->request.data.auth.user, + state->response.data.auth.nt_status_string, + state->response.data.auth.pam_error)); + request_error(state); } NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain, |