summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/winbindd_ads.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c
index 14f5cac465..27d8160c3f 100644
--- a/source3/nsswitch/winbindd_ads.c
+++ b/source3/nsswitch/winbindd_ads.c
@@ -723,6 +723,12 @@ static NTSTATUS domain_sid(struct winbindd_domain *domain, DOM_SID *sid)
rc = ads_domain_sid(ads, sid);
+ if (!ADS_ERR_OK(rc)) {
+ /* its a dead connection */
+ ads_destroy(ads);
+ domain->private = NULL;
+ }
+
return ads_ntstatus(rc);
}