summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_misc.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-12-21 14:57:03 +0100
committerVolker Lendecke <vl@samba.org>2009-12-21 16:27:19 +0100
commit958fdaf5c3ba17969a5110e6b2b08babb9096d7e (patch)
treeade39c0770cf117dcd3481e095aff96ff35caa03 /source3/winbindd/winbindd_misc.c
parent4f434e07e9a695ce789cd81416660baac7cbf48a (diff)
downloadsamba-958fdaf5c3ba17969a5110e6b2b08babb9096d7e.tar.gz
samba-958fdaf5c3ba17969a5110e6b2b08babb9096d7e.tar.bz2
samba-958fdaf5c3ba17969a5110e6b2b08babb9096d7e.zip
s3: Remove unused winbindd_dual_getdcname
Diffstat (limited to 'source3/winbindd/winbindd_misc.c')
-rw-r--r--source3/winbindd/winbindd_misc.c72
1 files changed, 0 insertions, 72 deletions
diff --git a/source3/winbindd/winbindd_misc.c b/source3/winbindd/winbindd_misc.c
index 3ebd9ffdbd..95d47ef2e9 100644
--- a/source3/winbindd/winbindd_misc.c
+++ b/source3/winbindd/winbindd_misc.c
@@ -225,78 +225,6 @@ enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain *
return WINBINDD_OK;
}
-enum winbindd_result winbindd_dual_getdcname(struct winbindd_domain *domain,
- struct winbindd_cli_state *state)
-{
- const char *dcname_slash = NULL;
- const 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 = rpccli_set_timeout(netlogon_pipe, 35000);
-
- req_domain = find_domain_from_name_noinit(state->request->domain_name);
- if (req_domain == domain) {
- result = rpccli_netr_GetDcName(netlogon_pipe,
- state->mem_ctx,
- domain->dcname,
- state->request->domain_name,
- &dcname_slash,
- &werr);
- } else {
- result = rpccli_netr_GetAnyDCName(netlogon_pipe,
- state->mem_ctx,
- domain->dcname,
- state->request->domain_name,
- &dcname_slash,
- &werr);
- }
- /* And restore our original timeout. */
- rpccli_set_timeout(netlogon_pipe, orig_timeout);
-
- if (!NT_STATUS_IS_OK(result)) {
- DEBUG(5,("Error requesting DCname for domain %s: %s\n",
- state->request->domain_name, nt_errstr(result)));
- return WINBINDD_ERROR;
- }
-
- if (!W_ERROR_IS_OK(werr)) {
- DEBUG(5, ("Error requesting DCname for domain %s: %s\n",
- state->request->domain_name, win_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;
-}
-
/* This is the child-only version of --sequence. It only allows for a single
* domain (ie "our" one) to be displayed. */