s3-libads: use ldap_init_fd() to initialize a ldap session if possible master
authorBjörn Baumbach <bb@sernet.de>
Wed, 3 Jun 2020 17:40:59 +0000 (19:40 +0200)
committerBjörn Baumbach <bb@sernet.de>
Wed, 10 Jun 2020 12:58:20 +0000 (14:58 +0200)
commita192f53d660800d47b9db5afb19a59bd18248623
tree3861a07bdd712ee821e1234dd0f3f2d13038580e
parentaccbd9ee1c6caad729b98471ea970df358f5ac0c
s3-libads: use ldap_init_fd() to initialize a ldap session if possible

Use the known ip address of the ldap server to open the connection and
initialize the ldap session with ldap_init_fd().

This avoid unnecessary DNS lookups which might block or prevent the
successful connection.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13124

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/libads/ldap.c