[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-4825-g2d0fd75
Gerald Carter
jerry at samba.org
Fri Jan 16 18:25:11 GMT 2009
The branch, v3-3-test has been updated
via 2d0fd7543d0543ce59cb84db64afb99aa1f304b4 (commit)
from 3764e6ed2a683a69706d7654e46b998de9294883 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit 2d0fd7543d0543ce59cb84db64afb99aa1f304b4
Author: Gerald (Jerry) Carter <jerry at samba.org>
Date: Fri Jan 16 12:06:49 2009 -0600
ads_connect: Return immediately on a failed GC connection.
ads_connect_gc() feeds an explicit server to ads_connect(). However, if the
resulting connection fails, the latter function was attempting to find a DC
on its own and continuing the connection. This resulting in GC searches being
sent over a connection using port 389 which would fail when using the base
search suffix outside of the domain naming context.
The fix is to fail immediately in ads_connect() since the GC lookup ordering
is handled already in ads_connect_gc().
(was commit 073e9f42f0c5f5de5d736ec7843d80a274c891ce in master)
-----------------------------------------------------------------------
Summary of changes:
source/libads/ldap.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/libads/ldap.c b/source/libads/ldap.c
index 291932d..f3bc2c5 100644
--- a/source/libads/ldap.c
+++ b/source/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);
--
Samba Shared Repository
More information about the samba-cvs
mailing list