wb-ndr: remove unused winbindd_dual_check_machine_acct()
authorStefan Metzmacher <metze@sernet.de>
Wed, 5 Mar 2008 10:28:25 +0000 (11:28 +0100)
committerStefan Metzmacher <metze@sernet.de>
Fri, 2 May 2008 14:13:27 +0000 (16:13 +0200)
metze

source/winbindd/winbindd_domain.c
source/winbindd/winbindd_misc.c

index 4fadc4618386477dd0c9a4e2f6f268bf6ecd826e..5d040c63fda5e32c2f434f2f80fccb9247b1ea79 100644 (file)
@@ -65,10 +65,6 @@ static const struct winbindd_child_dispatch_table domain_dispatch_table[] = {
                .name           = "PAM_CHAUTHTOK",
                .struct_cmd     = WINBINDD_PAM_CHAUTHTOK,
                .struct_fn      = winbindd_dual_pam_chauthtok,
-       },{
-               .name           = "CHECK_MACHACC",
-               .struct_cmd     = WINBINDD_CHECK_MACHACC,
-               .struct_fn      = winbindd_dual_check_machine_acct,
        },{
                .name           = "DUAL_USERINFO",
                .struct_cmd     = WINBINDD_DUAL_USERINFO,
index 3ef015fb39fb564c955e8e50697a22149ff3bab6..debb71bbbb4de6707ec8df0c0e531b97e5ea1966 100644 (file)
@@ -79,66 +79,6 @@ nomem:
        request_error(state);
 }
 
-enum winbindd_result winbindd_dual_check_machine_acct(struct winbindd_domain *domain,
-                                                     struct winbindd_cli_state *state)
-{
-       NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-        int num_retries = 0;
-       struct winbindd_domain *contact_domain;
-
-       DEBUG(3, ("[%5lu]: check machine account\n", (unsigned long)state->pid));
-
-       /* Get trust account password */
-
- again:
-
-       contact_domain = find_our_domain();
-       
-        /* This call does a cli_nt_setup_creds() which implicitly checks
-           the trust account password. */
-
-       invalidate_cm_connection(&contact_domain->conn);
-
-       {
-               struct rpc_pipe_client *netlogon_pipe;
-               result = cm_connect_netlogon(contact_domain, &netlogon_pipe);
-       }
-
-        if (!NT_STATUS_IS_OK(result)) {
-                DEBUG(3, ("could not open handle to NETLOGON pipe\n"));
-                goto done;
-        }
-
-        /* There is a race condition between fetching the trust account
-           password and the periodic machine password change.  So it's 
-          possible that the trust account password has been changed on us.  
-          We are returned NT_STATUS_ACCESS_DENIED if this happens. */
-
-#define MAX_RETRIES 8
-
-        if ((num_retries < MAX_RETRIES) && 
-            NT_STATUS_V(result) == NT_STATUS_V(NT_STATUS_ACCESS_DENIED)) {
-                num_retries++;
-                goto again;
-        }
-
-       /* Pass back result code - zero for success, other values for
-          specific failures. */
-
-       DEBUG(3, ("secret is %s\n", NT_STATUS_IS_OK(result) ?  
-                  "good" : "bad"));
-
- 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));
-       state->response.data.auth.pam_error = nt_status_to_pam(result);
-
-       DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("Checking the trust account password returned %s\n", 
-                                               state->response.data.auth.nt_status_string));
-
-       return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
-}
 
 /* Constants and helper functions for determining domain trust types */