svn commit: samba r7932 - in branches/SAMBA_4_0/source/librpc/rpc: .

metze at samba.org metze at samba.org
Sun Jun 26 11:35:50 GMT 2005


Author: metze
Date: 2005-06-26 11:35:50 +0000 (Sun, 26 Jun 2005)
New Revision: 7932

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

Log:
don't use the nbt called name as server name, for dcerpc_server_name()
in the ncacn_np trnaport

it's now supported to use the ip address in smbtorture for ncacn_np tests
that use dcerpc_server_name(),

and we can now pass the dns host name in the tree connect when we have the dns name 
on the smbtorture command line

metze
Modified:
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_smb.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_smb.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_smb.c	2005-06-26 11:34:34 UTC (rev 7931)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_smb.c	2005-06-26 11:35:50 UTC (rev 7932)
@@ -29,6 +29,7 @@
 struct smb_private {
 	uint16_t fnum;
 	struct smbcli_tree *tree;
+	const char *server_name;
 };
 
 
@@ -340,7 +341,7 @@
 static const char *smb_peer_name(struct dcerpc_connection *c)
 {
 	struct smb_private *smb = c->transport.private;
-	return smb->tree->session->transport->called.name;
+	return smb->server_name;
 }
 
 /*
@@ -404,9 +405,7 @@
 
 	talloc_free(pipe_name_talloc);
 
-	if (!NT_STATUS_IS_OK(status)) {
-                return status;
-        }
+	NT_STATUS_NOT_OK_RETURN(status);
 
 	/*
 	  fill in the transport methods
@@ -424,12 +423,12 @@
 	c->security_state.session_key = smb_session_key;
 
 	smb = talloc(c, struct smb_private);
-	if (smb == NULL) {
-		return NT_STATUS_NO_MEMORY;
-	}
+	NT_STATUS_HAVE_NO_MEMORY(smb);
 
-	smb->fnum = io.ntcreatex.out.fnum;
-	smb->tree = tree;
+	smb->fnum	= io.ntcreatex.out.fnum;
+	smb->tree	= tree;
+	smb->server_name= strupper_talloc(smb, tree->session->transport->socket->hostname);
+	NT_STATUS_HAVE_NO_MEMORY(smb->server_name);
 
 	c->transport.private = smb;
 



More information about the samba-cvs mailing list