From e1aed4f49c158522ab4a22767db035f3c83c0b5f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 9 Mar 2002 19:36:53 +0000 Subject: better detection of dead ADS connections, so we have some chance of reconnecting (This used to be commit 58b79c0dc882fa402423e44a594e30c27177f490) --- source3/nsswitch/winbindd_ads.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/nsswitch/winbindd_ads.c') 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); } -- cgit