better detection of dead ADS connections, so we have some chance of
authorAndrew Tridgell <tridge@samba.org>
Sat, 9 Mar 2002 19:36:53 +0000 (19:36 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sat, 9 Mar 2002 19:36:53 +0000 (19:36 +0000)
reconnecting

source/nsswitch/winbindd_ads.c

index 14f5cac465052286dc9d831008470d1bb2ddffac..27d8160c3f2f5f166988c2ddc4b18f9e19ddaaed 100644 (file)
@@ -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);
 }