1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3:cli_netlogon: let rpccli_connect_netlogon() retry once after NT_STATUS_NETWORK_ACCESS_DENIED

Otherwise we could easily endup with an endless loop.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2017-10-18 13:36:59 +02:00 committed by Andrew Bartlett
parent 90d57ec08c
commit 9c207adbe9

View File

@ -292,6 +292,7 @@ NTSTATUS rpccli_connect_netlogon(
bool do_serverauth;
struct rpc_pipe_client *rpccli;
NTSTATUS status;
bool retry = false;
again:
@ -354,9 +355,10 @@ again:
status = cli_rpc_pipe_open_bind_schannel(
cli, &ndr_table_netlogon, transport, creds_ctx,
&rpccli);
if (NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_ACCESS_DENIED)) {
if (!retry && NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_ACCESS_DENIED)) {
DBG_DEBUG("Retrying with serverauthenticate\n");
TALLOC_FREE(lck);
retry = true;
goto again;
}
if (!NT_STATUS_IS_OK(status)) {