diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index a630c5a0345..01e10c1260c 100755 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -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) {