summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-03-09 19:36:53 +0000
committerAndrew Tridgell <tridge@samba.org>2002-03-09 19:36:53 +0000
commite1aed4f49c158522ab4a22767db035f3c83c0b5f (patch)
tree5036c1d095079af457e731450d6a0008e7cd04a8
parentd0f80d2c41d115e3f62eca06a44c92c01ece6154 (diff)
downloadsamba-e1aed4f49c158522ab4a22767db035f3c83c0b5f.tar.gz
samba-e1aed4f49c158522ab4a22767db035f3c83c0b5f.tar.bz2
samba-e1aed4f49c158522ab4a22767db035f3c83c0b5f.zip
better detection of dead ADS connections, so we have some chance of
reconnecting (This used to be commit 58b79c0dc882fa402423e44a594e30c27177f490)
-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);
}