svn commit: samba r18063 - in branches/SAMBA_3_0/source: libads nsswitch

jra at samba.org jra at samba.org
Tue Sep 5 06:32:47 GMT 2006


Author: jra
Date: 2006-09-05 06:32:46 +0000 (Tue, 05 Sep 2006)
New Revision: 18063

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18063

Log:
When we get a successful connection using ADS,
cache the SAF name under both the domain name
and the realm name, as we could be looking up
under both. Jerry please check.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/libads/ldap.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c


Changeset:
Modified: branches/SAMBA_3_0/source/libads/ldap.c
===================================================================
--- branches/SAMBA_3_0/source/libads/ldap.c	2006-09-05 05:28:31 UTC (rev 18062)
+++ branches/SAMBA_3_0/source/libads/ldap.c	2006-09-05 06:32:46 UTC (rev 18063)
@@ -393,8 +393,9 @@
 		return ADS_ERROR(LDAP_OPERATIONS_ERROR);
 	}
 
-	/* cache the successful connection */
+	/* cache the successful connection for workgroup and realm */
 	saf_store( ads->server.workgroup, inet_ntoa(ads->ldap_ip));
+	saf_store( ads->server.realm, inet_ntoa(ads->ldap_ip));
 
 	ldap_set_option(ads->ld, LDAP_OPT_PROTOCOL_VERSION, &version);
 

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c	2006-09-05 05:28:31 UTC (rev 18062)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c	2006-09-05 06:32:46 UTC (rev 18063)
@@ -363,6 +363,9 @@
 	/* cache the server name for later connections */
 
 	saf_store( domain->name, (*cli)->desthost );
+	if (domain->alt_name) {
+		saf_store( domain->alt_name, (*cli)->desthost );
+	}
 
 	if (!cli_send_tconX(*cli, "IPC$", "IPC", "", 0)) {
 



More information about the samba-cvs mailing list