diff options
author | Yasuma Takeda <yasuma@osstech.co.jp> | 2009-02-11 14:10:21 -0800 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-07-30 09:22:12 +0200 |
commit | 2a6f8e88150df48271fbe663b5702d725bcac3eb (patch) | |
tree | 024bdb4181681385ae47c13e9981695a6f792298 /source | |
parent | 99ad00efd7d3d0990ec20e0f278d63cf55167d0c (diff) | |
download | samba-2a6f8e88150df48271fbe663b5702d725bcac3eb.tar.gz samba-2a6f8e88150df48271fbe663b5702d725bcac3eb.tar.xz samba-2a6f8e88150df48271fbe663b5702d725bcac3eb.zip |
Fix bug #6098 - When the DNS server is invalid, the ads_find_dc() does not work correctly with "security = domain"
1. If DNS server is invalid, the get_sorted_dc_list() is called with
realm(FQDN) and it fails.
2. On the next step, the get_sorted_dc_list() is called with realm(FQDN) again.
I think "again" is wrong place.
On the 2nd step, get_sorted_dc_list() should be called with realm(WORKGROUP).
(cherry picked from commit 58331a118dd6a7fb56e70afe6cf93ef7cfff7e81)
Diffstat (limited to 'source')
-rw-r--r-- | source/libads/ldap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/libads/ldap.c b/source/libads/ldap.c index 36e86936180..65f13cd7810 100644 --- a/source/libads/ldap.c +++ b/source/libads/ldap.c @@ -275,6 +275,8 @@ static NTSTATUS ads_find_dc(ADS_STRUCT *ads) if (c_realm && *c_realm) got_realm = True; + again: + /* we need to try once with the realm name and fallback to the netbios domain name if we fail (if netbios has not been disabled */ @@ -326,8 +328,6 @@ static NTSTATUS ads_find_dc(ADS_STRUCT *ads) sitename = sitename_fetch(realm); - again: - DEBUG(6,("ads_find_dc: (cldap) looking for %s '%s'\n", (got_realm ? "realm" : "domain"), realm)); |