svn commit: samba r10946 - in branches/SAMBA_4_0/source/smb_server: .

abartlet at samba.org abartlet at samba.org
Wed Oct 12 22:25:52 GMT 2005


Author: abartlet
Date: 2005-10-12 22:25:51 +0000 (Wed, 12 Oct 2005)
New Revision: 10946

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

Log:
Use the right name for the remote workstation, and always initialise it.

Should fix a valgrind error volker is seeing.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/smb_server/sesssetup.c
   branches/SAMBA_4_0/source/smb_server/smb_server.c


Changeset:
Modified: branches/SAMBA_4_0/source/smb_server/sesssetup.c
===================================================================
--- branches/SAMBA_4_0/source/smb_server/sesssetup.c	2005-10-12 22:24:43 UTC (rev 10945)
+++ branches/SAMBA_4_0/source/smb_server/sesssetup.c	2005-10-12 22:25:51 UTC (rev 10946)
@@ -63,8 +63,8 @@
 		req->smb_conn->negotiate.max_send = sess->old.in.bufsize;
 	}
 	
-	if (req->smb_conn->negotiate.called_name) {
-		remote_machine = req->smb_conn->negotiate.called_name->name;
+	if (req->smb_conn->negotiate.calling_name) {
+		remote_machine = req->smb_conn->negotiate.calling_name->name;
 	}
 	
 	if (!remote_machine) {
@@ -172,8 +172,8 @@
 		auth_context = req->smb_conn->negotiate.auth_context;
 	}
 
-	if (req->smb_conn->negotiate.called_name) {
-		remote_machine = req->smb_conn->negotiate.called_name->name;
+	if (req->smb_conn->negotiate.calling_name) {
+		remote_machine = req->smb_conn->negotiate.calling_name->name;
 	}
 	
 	if (!remote_machine) {

Modified: branches/SAMBA_4_0/source/smb_server/smb_server.c
===================================================================
--- branches/SAMBA_4_0/source/smb_server/smb_server.c	2005-10-12 22:24:43 UTC (rev 10945)
+++ branches/SAMBA_4_0/source/smb_server/smb_server.c	2005-10-12 22:25:51 UTC (rev 10946)
@@ -767,6 +767,9 @@
 
 	smb_conn->negotiate.zone_offset = get_time_zone(time(NULL));
 
+	smb_conn->negotiate.called_name = NULL;
+	smb_conn->negotiate.calling_name = NULL;
+
 	smbsrv_vuid_init(smb_conn);
 
 	srv_init_signing(smb_conn);



More information about the samba-cvs mailing list