s3-libads: Use ldap_init_fd() to connect to AD server in socket_wrapper
authorAndrew Bartlett <abartlet@samba.org>
Tue, 26 Apr 2011 03:53:45 +0000 (13:53 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 28 Apr 2011 03:30:21 +0000 (05:30 +0200)
commita427652010820fdf8fa82cf425f5162cc70348e0
tree640a2539c113d6b508e4cdd4aea15d512da9c580
parentab46d6610104b899ca8ac7cb695d8d18e5dc34ed
s3-libads: Use ldap_init_fd() to connect to AD server in socket_wrapper

This means that we control the connection setup, don't rely on signals
for timeouts and the connection uses socket_wrapper where that is
required in our test environment.

According to bug reports, this method is also used by curl and other
tools, so we are not the first to (ab)use the OpenLDAP libs in this
way.

It is ONLY enabled for socket_wrapper at this time, as this is the
best way to get 'make test' working for S3 winbind tests in an S4
domain.

Andrew Bartlett
source3/include/smb_ldap.h
source3/libads/ldap.c
source3/winbindd/winbindd_msrpc.c
source3/wscript