From a427652010820fdf8fa82cf425f5162cc70348e0 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 26 Apr 2011 13:53:45 +1000 Subject: 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 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/smb_ldap.h b/source3/include/smb_ldap.h index 45e586859d..7165de19bf 100644 --- a/source3/include/smb_ldap.h +++ b/source3/include/smb_ldap.h @@ -37,7 +37,14 @@ typedef int ber_int_t; #endif /* function declarations not included in proto.h */ -LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to); +LDAP *ldap_open_with_timeout(const char *server, + struct sockaddr_storage *ss, + int port, unsigned int to); + +#ifdef HAVE_LDAP_PVT_H +#include +#endif +int ldap_init_fd(ber_socket_t fd, int proto, char *uri, LDAP **ldp); #endif /* HAVE_LDAP_H */ -- cgit