svn commit: samba r19254 - in branches/SAMBA_3_0/source/nsswitch: .

gd at samba.org gd at samba.org
Thu Oct 12 11:25:37 GMT 2006


Author: gd
Date: 2006-10-12 11:25:37 +0000 (Thu, 12 Oct 2006)
New Revision: 19254

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19254

Log:
Make sure to also wait 35 seconds to receive a Netlogon GETDC reply
here in winbindd_getdcname().

Guenther

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_misc.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_misc.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_misc.c	2006-10-12 08:33:48 UTC (rev 19253)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_misc.c	2006-10-12 11:25:37 UTC (rev 19254)
@@ -196,6 +196,7 @@
 	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 @@
 		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)));



More information about the samba-cvs mailing list