diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-01-18 16:19:39 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-01-18 16:19:39 +0100 |
commit | bfbb0fb17f4eedb8f22d0694c5d4a3b82dfe189b (patch) | |
tree | 068b3849e31c7b90a465be8172aac7c2b472d205 /source3/libads | |
parent | 5cf9989a70a23e5b955b7229fa95d3e604b1883d (diff) | |
parent | c45b6ec29a5b3a39b83209e970b645e5ed0a411c (diff) | |
download | samba-bfbb0fb17f4eedb8f22d0694c5d4a3b82dfe189b.tar.gz samba-bfbb0fb17f4eedb8f22d0694c5d4a3b82dfe189b.tar.bz2 samba-bfbb0fb17f4eedb8f22d0694c5d4a3b82dfe189b.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/libads')
-rw-r--r-- | source3/libads/ldap.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index a598580941..f6da54f35b 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -581,9 +581,20 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads) TALLOC_FREE(s); } - if (ads->server.ldap_server && - ads_try_connect(ads, ads->server.ldap_server, ads->server.gc)) { - goto got_connection; + if (ads->server.ldap_server) + { + if (ads_try_connect(ads, ads->server.ldap_server, ads->server.gc)) { + goto got_connection; + } + + /* The choice of which GC use is handled one level up in + ads_connect_gc(). If we continue on from here with + ads_find_dc() we will get GC searches on port 389 which + doesn't work. --jerry */ + + if (ads->server.gc == true) { + return ADS_ERROR(LDAP_OPERATIONS_ERROR); + } } ntstatus = ads_find_dc(ads); |