diff options
author | Günther Deschner <gd@samba.org> | 2006-10-12 11:25:37 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:26 -0500 |
commit | 96869053a5abe37efee679f524beb83da0191caa (patch) | |
tree | faf089d13fb0e2663482b3fb7fdec7bc9976774c /source3/nsswitch | |
parent | c7864f3d53a59fd823fa2e3bf79edd1d735a15ed (diff) | |
download | samba-96869053a5abe37efee679f524beb83da0191caa.tar.gz samba-96869053a5abe37efee679f524beb83da0191caa.tar.bz2 samba-96869053a5abe37efee679f524beb83da0191caa.zip |
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)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/winbindd_misc.c | 8 |
1 files changed, 8 insertions, 0 deletions
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))); |