From 96869053a5abe37efee679f524beb83da0191caa Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 12 Oct 2006 11:25:37 +0000 Subject: r19254: Make sure to also wait 35 seconds to receive a Netlogon GETDC reply here in winbindd_getdcname(). Guenther (This used to be commit 58a181edc5ea8e87e9978f11a5a729ad4dc60091) --- source3/nsswitch/winbindd_misc.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/nsswitch/winbindd_misc.c') diff --git a/source3/nsswitch/winbindd_misc.c b/source3/nsswitch/winbindd_misc.c index 34ce468516..84af6c9647 100644 --- a/source3/nsswitch/winbindd_misc.c +++ b/source3/nsswitch/winbindd_misc.c @@ -196,6 +196,7 @@ enum winbindd_result winbindd_dual_getdcname(struct winbindd_domain *domain, struct rpc_pipe_client *netlogon_pipe; NTSTATUS result; WERROR werr; + unsigned int orig_timeout; state->request.domain_name [sizeof(state->request.domain_name)-1] = '\0'; @@ -210,9 +211,16 @@ enum winbindd_result winbindd_dual_getdcname(struct winbindd_domain *domain, 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); + werr = rpccli_netlogon_getdcname(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: %s\n", dos_errstr(werr))); -- cgit