ads_connect: Return immediately on a failed GC connection.
authorGerald (Jerry) Carter <jerry@samba.org>
Fri, 16 Jan 2009 18:06:49 +0000 (12:06 -0600)
committerGerald (Jerry) Carter <jerry@samba.org>
Fri, 16 Jan 2009 18:15:33 +0000 (12:15 -0600)
commit073e9f42f0c5f5de5d736ec7843d80a274c891ce
tree7879ef2288740dda7bb33e79f41f8254c523e6e8
parent57f978d1712943f6c93e914e52a12a4cfb73aadd
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().
source3/libads/ldap.c