summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-03-12 17:09:34 +0100
committerKarolin Seeger <kseeger@samba.org>2018-05-07 09:57:26 +0200
commitb7c598d35249db1e603f92f2d6bad0d179c7e27b (patch)
treeda187f26fff1b4cd529afc8260cbd0d53c71752c /source3
parentb0a14aec00e61569e1808f6c736c9e6a69e4554f (diff)
downloadsamba-b7c598d35249db1e603f92f2d6bad0d179c7e27b.tar.gz
winbindd: add retry to _wbint_LookupSids()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit c2cd2d3f3137e27cd6e4cabd34f27b49251f078d)
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_dual_srv.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c
index 29a91040898..555bec47419 100644
--- a/source3/winbindd/winbindd_dual_srv.c
+++ b/source3/winbindd/winbindd_dual_srv.c
@@ -97,6 +97,7 @@ NTSTATUS _wbint_LookupSids(struct pipes_struct *p, struct wbint_LookupSids *r)
struct winbindd_domain *domain = wb_child_domain();
struct lsa_RefDomainList *domains = r->out.domains;
NTSTATUS status;
+ bool retry = false;
if (domain == NULL) {
return NT_STATUS_REQUEST_NOT_ACCEPTED;
@@ -108,6 +109,7 @@ NTSTATUS _wbint_LookupSids(struct pipes_struct *p, struct wbint_LookupSids *r)
* and winbindd_ad call into lsa_lookupsids anyway. Caching is
* done at the wbint RPC layer.
*/
+again:
status = rpc_lookup_sids(p->mem_ctx, domain, r->in.sids,
&domains, &r->out.names);
@@ -115,7 +117,11 @@ NTSTATUS _wbint_LookupSids(struct pipes_struct *p, struct wbint_LookupSids *r)
r->out.domains = domains;
}
- reset_cm_connection_on_error(domain, NULL, status);
+ if (!retry && reset_cm_connection_on_error(domain, NULL, status)) {
+ retry = true;
+ goto again;
+ }
+
return status;
}