summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-02-07 02:44:37 +0000
committerAndrew Tridgell <tridge@samba.org>2002-02-07 02:44:37 +0000
commitfb444a546effe22e2a7c314a10473f0680be0cc6 (patch)
tree1b20bfb645fdc365fc9f07485efb1adce8ebdb6a /source3
parentbced3ac18efb3a76e5da4a653f5959f2825c90a3 (diff)
downloadsamba-fb444a546effe22e2a7c314a10473f0680be0cc6.tar.gz
samba-fb444a546effe22e2a7c314a10473f0680be0cc6.tar.bz2
samba-fb444a546effe22e2a7c314a10473f0680be0cc6.zip
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)
Diffstat (limited to 'source3')
-rw-r--r--source3/libads/ldap.c5
1 files changed, 3 insertions, 2 deletions
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);