diff options
author | Jeremy Allison <jra@samba.org> | 2006-10-06 21:35:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:18 -0500 |
commit | 00056ab43192dc83b823e51126772ba4c19d0519 (patch) | |
tree | 323f9a79ac9c90ac8aedf146b16df16917bcc4fc | |
parent | 2395cd57f8920bdde3a0c71eeb945d10c621bbbe (diff) | |
download | samba-00056ab43192dc83b823e51126772ba4c19d0519.tar.gz samba-00056ab43192dc83b823e51126772ba4c19d0519.tar.bz2 samba-00056ab43192dc83b823e51126772ba4c19d0519.zip |
r19159: The getdc call can take a long time. Allow for timeouts.
Jeremy.
(This used to be commit 99bebb65273c78d9867254c47438577bb21af4ee)
-rw-r--r-- | source3/nsswitch/winbindd_cm.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index b947ce75ec..45fce21450 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -294,7 +294,7 @@ static BOOL get_dc_name_via_netlogon(const struct winbindd_domain *domain, NTSTATUS result; WERROR werr; TALLOC_CTX *mem_ctx; - + unsigned int orig_timeout; fstring tmp; char *p; @@ -320,9 +320,17 @@ static BOOL get_dc_name_via_netlogon(const struct winbindd_domain *domain, return False; } + /* 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, mem_ctx, our_domain->dcname, domain->name, tmp); + /* And restore our original timeout. */ + cli_set_timeout(netlogon_pipe->cli, orig_timeout); + talloc_destroy(mem_ctx); if (!W_ERROR_IS_OK(werr)) { |