From 258f7b50dc3a513d6ea956e2231aa43a57fa81c7 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 16 Oct 2006 14:29:14 +0000 Subject: r19340: Wait longer then 10 seconds for a samr_query_groupmem lookup to succeed. Guenther (This used to be commit 37dd019e21cab2f0df314b0b741f79422fc10d1b) --- source3/nsswitch/winbindd_rpc.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source3/nsswitch') diff --git a/source3/nsswitch/winbindd_rpc.c b/source3/nsswitch/winbindd_rpc.c index 06f0d2cb60..2e2b895352 100644 --- a/source3/nsswitch/winbindd_rpc.c +++ b/source3/nsswitch/winbindd_rpc.c @@ -615,6 +615,7 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain, unsigned int j; fstring sid_string; struct rpc_pipe_client *cli; + unsigned int orig_timeout; DEBUG(10,("rpc: lookup_groupmem %s sid=%s\n", domain->name, sid_to_string(sid_string, group_sid))); @@ -637,10 +638,18 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain, /* Step #1: Get a list of user rids that are the members of the group. */ + /* This call can take a long time - allow the server to time out. + 35 seconds should do it. */ + + orig_timeout = cli_set_timeout(cli->cli, 35000); + result = rpccli_samr_query_groupmem(cli, mem_ctx, &group_pol, num_names, &rid_mem, name_types); + /* And restore our original timeout. */ + cli_set_timeout(cli->cli, orig_timeout); + rpccli_samr_close(cli, mem_ctx, &group_pol); if (!NT_STATUS_IS_OK(result)) -- cgit