s3:libads/ldap.c: store the dc name in the saf cache as in all other places
authorStefan Metzmacher <metze@samba.org>
Mon, 27 Oct 2008 18:39:30 +0000 (19:39 +0100)
committerStefan Metzmacher <metze@samba.org>
Sat, 13 Dec 2008 17:43:47 +0000 (18:43 +0100)
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 543fa85a711337e979c7b631bda5db95d109ef59)
(cherry picked from commit 17efebde11eafd065c2cac39cdbe55b8d40d40be)
(cherry picked from commit 9e78bfdbe107519f2ddfa4d532771945a7691b46)

source/libads/ldap.c

index a462f463c772683c6bed519b20fc931ccb12e178..47b9f3e4d2c58ea8ccb1249dcb2bfd9bdf6e7c1c 100644 (file)
@@ -519,9 +519,8 @@ got_connection:
 
        /* cache the successful connection for workgroup and realm */
        if (ads_closest_dc(ads)) {
-               print_sockaddr(addr, sizeof(addr), &ads->ldap.ss);
-               saf_store( ads->server.workgroup, addr);
-               saf_store( ads->server.realm, addr);
+               saf_store( ads->server.workgroup, ads->config.ldap_server_name);
+               saf_store( ads->server.realm, ads->config.ldap_server_name);
        }
 
        ldap_set_option(ads->ldap.ld, LDAP_OPT_PROTOCOL_VERSION, &version);