From fb444a546effe22e2a7c314a10473f0680be0cc6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 7 Feb 2002 02:44:37 +0000 Subject: when a trusted domain is down an ADS server will return a success on a get trusted domains query but leave the domain SID blank - we need to fail the add of the trusted domain in winbindd in that case (This used to be commit 24c7e7a3849df3a3378f7e7f20099de048f0b7bd) --- source3/libads/ldap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/libads') diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 4567a42c0f..a13bda5fa9 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -855,8 +855,9 @@ ADS_STATUS ads_trusted_domains(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, for (i=0, msg = ads_first_entry(ads, res); msg; msg = ads_next_entry(ads, msg)) { (*names)[i] = ads_pull_string(ads, mem_ctx, msg, "flatName"); - ads_pull_sid(ads, msg, "securityIdentifier", &(*sids)[i]); - i++; + if (ads_pull_sid(ads, msg, "securityIdentifier", &(*sids)[i])) { + i++; + } } ads_msgfree(ads, res); -- cgit