summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-07-06 13:38:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:19:11 -0500
commit67d8c7432f116a0721b9bbff38632b8cc0535259 (patch)
treed94daa1990848feaaeea8c2053131a19317a200a /source3/libads
parent57dd09939a59385902ca309f0bd382a11e2f773a (diff)
downloadsamba-67d8c7432f116a0721b9bbff38632b8cc0535259.tar.gz
samba-67d8c7432f116a0721b9bbff38632b8cc0535259.tar.bz2
samba-67d8c7432f116a0721b9bbff38632b8cc0535259.zip
r16836: When receiving a CLDAP reply make sure that we always store the correct
netbios domain name in server affinity cache. Guenther (This used to be commit 08958411eeff430fb523d9b73e0259d060bac17b)
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/ldap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index db2a51307a..ef4be210c6 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -149,18 +149,20 @@ BOOL ads_try_connect(ADS_STRUCT *ads, const char *server )
SAFE_FREE(ads->config.realm);
SAFE_FREE(ads->config.bind_path);
SAFE_FREE(ads->config.ldap_server_name);
+ SAFE_FREE(ads->server.workgroup);
ads->config.ldap_server_name = SMB_STRDUP(cldap_reply.hostname);
strupper_m(cldap_reply.domain);
ads->config.realm = SMB_STRDUP(cldap_reply.domain);
ads->config.bind_path = ads_build_dn(ads->config.realm);
+ ads->server.workgroup = SMB_STRDUP(cldap_reply.netbios_domain);
ads->ldap_port = LDAP_PORT;
ads->ldap_ip = *interpret_addr2(srv);
SAFE_FREE(srv);
/* cache the successful connection */
-
+
saf_store( ads->server.workgroup, server );
return True;