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:
parent
90d57ec08c
commit
9c207adbe9
@ -292,6 +292,7 @@ NTSTATUS rpccli_connect_netlogon(
|
|||||||
bool do_serverauth;
|
bool do_serverauth;
|
||||||
struct rpc_pipe_client *rpccli;
|
struct rpc_pipe_client *rpccli;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
bool retry = false;
|
||||||
|
|
||||||
again:
|
again:
|
||||||
|
|
||||||
@ -354,9 +355,10 @@ again:
|
|||||||
status = cli_rpc_pipe_open_bind_schannel(
|
status = cli_rpc_pipe_open_bind_schannel(
|
||||||
cli, &ndr_table_netlogon, transport, creds_ctx,
|
cli, &ndr_table_netlogon, transport, creds_ctx,
|
||||||
&rpccli);
|
&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");
|
DBG_DEBUG("Retrying with serverauthenticate\n");
|
||||||
TALLOC_FREE(lck);
|
TALLOC_FREE(lck);
|
||||||
|
retry = true;
|
||||||
goto again;
|
goto again;
|
||||||
}
|
}
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user