remove unused winbindd_dual_getdcname() support
authorStefan Metzmacher <metze@sernet.de>
Mon, 17 Sep 2007 14:28:20 +0000 (16:28 +0200)
committerStefan Metzmacher <metze@sernet.de>
Thu, 11 Oct 2007 15:21:49 +0000 (17:21 +0200)
metze

source/winbindd/winbindd_dual.c
source/winbindd/winbindd_misc.c

index f6b9f5f..e7c6580 100644 (file)
@@ -695,7 +695,6 @@ const struct winbindd_child_dispatch_table domain_dispatch_table[] = {
        { WINBINDD_LOOKUPNAME,           winbindd_dual_lookupname,            "LOOKUPNAME" },
        { WINBINDD_LOOKUPRIDS,           winbindd_dual_lookuprids,            "LOOKUPRIDS" },
        { WINBINDD_LIST_TRUSTDOM,        winbindd_dual_list_trusted_domains,  "LIST_TRUSTDOM" },
-       { WINBINDD_GETDCNAME,            winbindd_dual_getdcname,             "GETDCNAME" },
        { WINBINDD_SHOW_SEQUENCE,        winbindd_dual_show_sequence,         "SHOW_SEQUENCE" },
        { WINBINDD_PAM_AUTH,             winbindd_dual_pam_auth,              "PAM_AUTH" },
        { WINBINDD_PAM_AUTH_CRAP,        winbindd_dual_pam_auth_crap,         "AUTH_CRAP" },
index 82695b2..8a5bafe 100644 (file)
@@ -259,68 +259,6 @@ nomem:
        return;
 }
 
-enum winbindd_result winbindd_dual_getdcname(struct winbindd_domain *domain,
-                                            struct winbindd_cli_state *state)
-{
-       fstring dcname_slash;
-       char *p;
-       struct rpc_pipe_client *netlogon_pipe;
-       NTSTATUS result;
-       WERROR werr;
-       unsigned int orig_timeout;
-       struct winbindd_domain *req_domain;
-
-       state->request.domain_name
-               [sizeof(state->request.domain_name)-1] = '\0';
-
-       DEBUG(3, ("[%5lu]: Get DC name for %s\n", (unsigned long)state->pid,
-                 state->request.domain_name));
-
-       result = cm_connect_netlogon(domain, &netlogon_pipe);
-
-       if (!NT_STATUS_IS_OK(result)) {
-               DEBUG(1, ("Can't contact the NETLOGON pipe\n"));
-               return WINBINDD_ERROR;
-       }
-
-       /* This call can take a long time - allow the server to time out.
-          35 seconds should do it. */
-
-       orig_timeout = cli_set_timeout(netlogon_pipe->cli, 35000);
-
-       req_domain = find_domain_from_name_noinit(state->request.domain_name);
-       if (req_domain == domain) {
-               werr = rpccli_netlogon_getdcname(netlogon_pipe, state->mem_ctx,
-                                                domain->dcname,
-                                                state->request.domain_name,
-                                                dcname_slash);
-       } else {
-               werr = rpccli_netlogon_getanydcname(netlogon_pipe, state->mem_ctx,
-                                                   domain->dcname,
-                                                   state->request.domain_name,
-                                                   dcname_slash);
-       }
-       /* And restore our original timeout. */
-       cli_set_timeout(netlogon_pipe->cli, orig_timeout);
-
-       if (!W_ERROR_IS_OK(werr)) {
-               DEBUG(5, ("Error requesting DCname for domain %s: %s\n",
-                       state->request.domain_name, dos_errstr(werr)));
-               return WINBINDD_ERROR;
-       }
-
-       p = dcname_slash;
-       if (*p == '\\') {
-               p+=1;
-       }
-       if (*p == '\\') {
-               p+=1;
-       }
-
-       fstrcpy(state->response.data.dc_name, p);
-       return WINBINDD_OK;
-}
-
 static void winbindd_get_dc_info_recv(TALLOC_CTX *mem_ctx, BOOL success,
                                      struct winbindd_ndr_call *c,
                                      void *_r,