s3-libads: use dns name to open a ldap session
authorBjörn Baumbach <bb@sernet.de>
Mon, 10 Feb 2020 18:19:44 +0000 (19:19 +0100)
committerBjörn Baumbach <bb@sernet.de>
Thu, 5 Mar 2020 12:29:26 +0000 (12:29 +0000)
Required for working certificate verification.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13124
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
Autobuild-User(master): Björn Baumbach <bb@sernet.de>
Autobuild-Date(master): Thu Mar  5 12:29:26 UTC 2020 on sn-devel-184

source3/libads/ldap.c

index a630c5a0345863da78a8751d961e0287ea410cd1..01e10c1260ce170df9221099160b3880a2c6d3e9 100755 (executable)
@@ -669,7 +669,7 @@ got_connection:
 
        /* Otherwise setup the TCP LDAP session */
 
-       ads->ldap.ld = ldap_open_with_timeout(addr,
+       ads->ldap.ld = ldap_open_with_timeout(ads->config.ldap_server_name,
                                              &ads->ldap.ss,
                                              ads->ldap.port, lp_ldap_timeout());
        if (ads->ldap.ld == NULL) {