summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_pam.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-03-29 17:52:38 +0200
committerVolker Lendecke <vl@samba.org>2010-04-19 14:27:19 +0200
commit61ec0f571ad81dc101fe6de7a8e9674a7119cf2b (patch)
tree87fc4d7aea6adf0e061d23f63282609f5ef3b072 /source3/winbindd/winbindd_pam.c
parentfddef8fd0ae169ebd2f20d9cc2458d2df44110a0 (diff)
downloadsamba-61ec0f571ad81dc101fe6de7a8e9674a7119cf2b.tar.gz
samba-61ec0f571ad81dc101fe6de7a8e9674a7119cf2b.tar.bz2
samba-61ec0f571ad81dc101fe6de7a8e9674a7119cf2b.zip
s3: Convert WINBINDD_PAM_AUTH to the new async API
Diffstat (limited to 'source3/winbindd/winbindd_pam.c')
-rw-r--r--source3/winbindd/winbindd_pam.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 796bc3eaed..2e1bc204e6 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -795,70 +795,6 @@ static NTSTATUS append_auth_data(struct winbindd_cli_state *state,
return NT_STATUS_OK;
}
-void winbindd_pam_auth(struct winbindd_cli_state *state)
-{
- struct winbindd_domain *domain;
- fstring name_domain, name_user, mapped_user;
- char *mapped = NULL;
- NTSTATUS result;
- NTSTATUS name_map_status = NT_STATUS_UNSUCCESSFUL;
-
- /* Ensure null termination */
- state->request->data.auth.user
- [sizeof(state->request->data.auth.user)-1]='\0';
-
- /* Ensure null termination */
- state->request->data.auth.pass
- [sizeof(state->request->data.auth.pass)-1]='\0';
-
- DEBUG(3, ("[%5lu]: pam auth %s\n", (unsigned long)state->pid,
- state->request->data.auth.user));
-
- if (!check_request_flags(state->request->flags)) {
- result = NT_STATUS_INVALID_PARAMETER_MIX;
- goto done;
- }
-
- /* Parse domain and username */
-
- name_map_status = normalize_name_unmap(state->mem_ctx,
- state->request->data.auth.user,
- &mapped);
-
- /* If the name normalization didnt' actually do anything,
- just use the original name */
-
- if (NT_STATUS_IS_OK(name_map_status)
- ||NT_STATUS_EQUAL(name_map_status, NT_STATUS_FILE_RENAMED)) {
- fstrcpy(mapped_user, mapped);
- } else {
- fstrcpy(mapped_user, state->request->data.auth.user);
- }
-
- if (!canonicalize_username(mapped_user, name_domain, name_user)) {
- result = NT_STATUS_NO_SUCH_USER;
- goto done;
- }
-
- domain = find_auth_domain(state->request->flags, name_domain);
-
- if (domain == NULL) {
- 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);
-}
-
static NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
struct winbindd_cli_state *state,
struct netr_SamInfo3 **info3)