svn commit: samba r16836 - branches/SAMBA_3_0/source/libads
trunk/source/libads
gd at samba.org
gd at samba.org
Thu Jul 6 13:38:41 GMT 2006
Author: gd
Date: 2006-07-06 13:38:41 +0000 (Thu, 06 Jul 2006)
New Revision: 16836
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16836
Log:
When receiving a CLDAP reply make sure that we always store the correct
netbios domain name in server affinity cache.
Guenther
Modified:
branches/SAMBA_3_0/source/libads/ldap.c
trunk/source/libads/ldap.c
Changeset:
Modified: branches/SAMBA_3_0/source/libads/ldap.c
===================================================================
--- branches/SAMBA_3_0/source/libads/ldap.c 2006-07-06 08:42:43 UTC (rev 16835)
+++ branches/SAMBA_3_0/source/libads/ldap.c 2006-07-06 13:38:41 UTC (rev 16836)
@@ -149,18 +149,20 @@
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;
Modified: trunk/source/libads/ldap.c
===================================================================
--- trunk/source/libads/ldap.c 2006-07-06 08:42:43 UTC (rev 16835)
+++ trunk/source/libads/ldap.c 2006-07-06 13:38:41 UTC (rev 16836)
@@ -149,18 +149,20 @@
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;
More information about the samba-cvs
mailing list