From d869e7a0d85a4719078437539267c4acdf97dece Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 30 Mar 2010 23:02:36 +0200 Subject: s3: Convert WINBINDD_PAM_AUTH_CRAP to the new async API --- source3/winbindd/winbindd_pam.c | 71 ----------------------------------------- 1 file changed, 71 deletions(-) (limited to 'source3/winbindd/winbindd_pam.c') diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index 2e1bc204e6..140fa3c506 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -1694,77 +1694,6 @@ done: return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR; } - -/********************************************************************** - Challenge Response Authentication Protocol -**********************************************************************/ - -void winbindd_pam_auth_crap(struct winbindd_cli_state *state) -{ - struct winbindd_domain *domain = NULL; - const char *domain_name = NULL; - NTSTATUS result; - - if (!check_request_flags(state->request->flags)) { - result = NT_STATUS_INVALID_PARAMETER_MIX; - goto done; - } - - if (!state->privileged) { - DEBUG(2, ("winbindd_pam_auth_crap: non-privileged access " - "denied. !\n")); - DEBUGADD(2, ("winbindd_pam_auth_crap: Ensure permissions " - "on %s are set correctly.\n", - get_winbind_priv_pipe_dir())); - /* send a better message than ACCESS_DENIED */ - fstr_sprintf(state->response->data.auth.error_string, - "winbind client not authorized to use " - "winbindd_pam_auth_crap. Ensure permissions on " - "%s are set correctly.", - get_winbind_priv_pipe_dir()); - result = NT_STATUS_ACCESS_DENIED; - goto done; - } - - /* Ensure null termination */ - state->request->data.auth_crap.user - [sizeof(state->request->data.auth_crap.user)-1]=0; - state->request->data.auth_crap.domain - [sizeof(state->request->data.auth_crap.domain)-1]=0; - - DEBUG(3, ("[%5lu]: pam auth crap domain: [%s] user: %s\n", - (unsigned long)state->pid, - state->request->data.auth_crap.domain, - state->request->data.auth_crap.user)); - - if (*state->request->data.auth_crap.domain != '\0') { - domain_name = state->request->data.auth_crap.domain; - } else if (lp_winbind_use_default_domain()) { - domain_name = lp_workgroup(); - } - - if (domain_name != NULL) - domain = find_auth_domain(state->request->flags, domain_name); - - if (domain != NULL) { - sendto_domain(state, domain); - return; - } - - result = NT_STATUS_NO_SUCH_USER; - - done: - set_auth_errors(state->response, result); - DEBUG(5, ("CRAP authentication for %s\\%s returned %s (PAM: %d)\n", - state->request->data.auth_crap.domain, - state->request->data.auth_crap.user, - state->response->data.auth.nt_status_string, - state->response->data.auth.pam_error)); - request_error(state); - return; -} - - enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain, struct winbindd_cli_state *state) { -- cgit