svn commit: samba r8433 - in trunk/source: auth include rpc_server

jmcd at samba.org jmcd at samba.org
Wed Jul 13 20:10:26 GMT 2005


Author: jmcd
Date: 2005-07-13 20:10:26 +0000 (Wed, 13 Jul 2005)
New Revision: 8433

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

Log:
Merge from 3.0: Fix #2077, passing our server name as the login server
when logging in on trusted domain account.  We now pass the correct (trusted
DC) server name in this case.

Modified:
   trunk/source/auth/auth_util.c
   trunk/source/include/auth.h
   trunk/source/rpc_server/srv_netlog_nt.c


Changeset:
Modified: trunk/source/auth/auth_util.c
===================================================================
--- trunk/source/auth/auth_util.c	2005-07-13 20:04:26 UTC (rev 8432)
+++ trunk/source/auth/auth_util.c	2005-07-13 20:10:26 UTC (rev 8433)
@@ -1327,6 +1327,9 @@
 		return nt_status;
 	}
 
+	(*server_info)->login_server = unistr2_tdup(mem_ctx, 
+						    &(info3->uni_logon_srv));
+
 	(*server_info)->ptok = token; 
 
 	SAFE_FREE(lgroupSIDs);

Modified: trunk/source/include/auth.h
===================================================================
--- trunk/source/include/auth.h	2005-07-13 20:04:26 UTC (rev 8432)
+++ trunk/source/include/auth.h	2005-07-13 20:10:26 UTC (rev 8433)
@@ -69,6 +69,8 @@
 	
 	DATA_BLOB user_session_key;
 	DATA_BLOB lm_session_key;
+
+        char *login_server; /* which server authorized the login? */
 	
 	uint32 sam_fill_level;  /* How far is this structure filled? */
 	

Modified: trunk/source/rpc_server/srv_netlog_nt.c
===================================================================
--- trunk/source/rpc_server/srv_netlog_nt.c	2005-07-13 20:04:26 UTC (rev 8432)
+++ trunk/source/rpc_server/srv_netlog_nt.c	2005-07-13 20:10:26 UTC (rev 8433)
@@ -764,8 +764,13 @@
 			return NT_STATUS_UNSUCCESSFUL;
 		}
 		
-		pstrcpy(my_name, global_myname());
-
+		
+		if(server_info->login_server) {
+		        pstrcpy(my_name, server_info->login_server);
+		} else {
+		        pstrcpy(my_name, global_myname());
+		}
+		
 		if (!NT_STATUS_IS_OK(status 
 				     = nt_token_to_group_list(p->mem_ctx, 
 							      &domain_sid, 



More information about the samba-cvs mailing list