From 71eb2d9c2a41cf40e084f2e4ce98c56211ae1382 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 12 Mar 2018 19:53:53 +0100 Subject: [PATCH] winbindd: add retry to _winbind_DsrUpdateReadOnlyServerDnsRecords Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Ralph Boehme Reviewed-by: Volker Lendecke (cherry picked from commit e608f058b8f2d2295e24498daa35852de3212b23) --- source3/winbindd/winbindd_dual_srv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c index 1acba3a29e3..20b919ca3b7 100644 --- a/source3/winbindd/winbindd_dual_srv.c +++ b/source3/winbindd/winbindd_dual_srv.c @@ -858,12 +858,15 @@ NTSTATUS _winbind_DsrUpdateReadOnlyServerDnsRecords(struct pipes_struct *p, NTSTATUS status; struct rpc_pipe_client *netlogon_pipe = NULL; struct netlogon_creds_cli_context *netlogon_creds_ctx = NULL; + struct dcerpc_binding_handle *b = NULL; + bool retry = false; domain = wb_child_domain(); if (domain == NULL) { return NT_STATUS_REQUEST_NOT_ACCEPTED; } +reconnect: status = cm_connect_netlogon_secure(domain, &netlogon_pipe, &netlogon_creds_ctx); @@ -872,12 +875,19 @@ NTSTATUS _winbind_DsrUpdateReadOnlyServerDnsRecords(struct pipes_struct *p, goto done; } + b = netlogon_pipe->binding_handle; + status = netlogon_creds_cli_DsrUpdateReadOnlyServerDnsRecords(netlogon_creds_ctx, netlogon_pipe->binding_handle, r->in.site_name, r->in.dns_ttl, r->in.dns_names); + if (!retry && reset_cm_connection_on_error(domain, b, status)) { + retry = true; + goto reconnect; + } + /* Pass back result code - zero for success, other values for specific failures. */ -- 2.11.4.GIT