1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba

This commit is contained in:
Jeremy Allison 2009-01-16 12:25:35 -08:00
commit d03133e696

View File

@ -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);