summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-10-03 21:43:56 +0000
committerGerald Carter <jerry@samba.org>2003-10-03 21:43:56 +0000
commit9cfd26141cf9530f27e673bfae119d9879894dd4 (patch)
treea41a3ff126ac6bfcd824db4e147fadbb6a31a1f2 /source3/nsswitch
parentec7716734ef8860ec8071ef7872672c4cb02a4e8 (diff)
downloadsamba-9cfd26141cf9530f27e673bfae119d9879894dd4.tar.gz
samba-9cfd26141cf9530f27e673bfae119d9879894dd4.tar.bz2
samba-9cfd26141cf9530f27e673bfae119d9879894dd4.zip
don't call ads_destroy() twice; fixes segfault in winbindd when DC goes down; bug 437
(This used to be commit 9da4d1f7dbb289dd1db5e57a4fd78004bbfbd26b)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_ads.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c
index c64359a224..ef3f0f8fc2 100644
--- a/source3/nsswitch/winbindd_ads.c
+++ b/source3/nsswitch/winbindd_ads.c
@@ -787,9 +787,13 @@ static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq)
}
rc = ads_USN(ads, seq);
+
if (!ADS_ERR_OK(rc)) {
- /* its a dead connection */
- ads_destroy(&ads);
+
+ /* its a dead connection ; don't destroy it
+ through since ads_USN() has already done
+ that indirectly */
+
domain->private = NULL;
}
return ads_ntstatus(rc);
@@ -910,8 +914,11 @@ 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);
+
+ /* its a dead connection; don't destroy it though
+ since that has already been done indirectly
+ by ads_domain_sid() */
+
domain->private = NULL;
}