svn commit: samba r3047 - in branches/SAMBA_4_0/source: librpc/rpc ntvfs/ipc

jelmer at samba.org jelmer at samba.org
Mon Oct 18 16:25:37 GMT 2004


Author: jelmer
Date: 2004-10-18 16:25:36 +0000 (Mon, 18 Oct 2004)
New Revision: 3047

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source&rev=3047&nolog=1

Log:
Always include a \ again before the pipe name we're opening. Without a 
backslash works, but is not like Windows does it.

Modified:
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c
   branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c	2004-10-18 16:07:08 UTC (rev 3046)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c	2004-10-18 16:25:36 UTC (rev 3047)
@@ -456,6 +456,10 @@
 		!strncasecmp(pipe_name, "\\pipe\\", 6)) {
 		pipe_name+=6;
 	}
+
+	if (pipe_name[0] != '\\') {
+		pipe_name = talloc_asprintf(mem_ctx, "\\%s", pipe_name);
+	}
 	
 	if (!username || !username[0]) {
 		status = smbcli_full_connection(NULL, &cli, lp_netbios_name(),

Modified: branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c	2004-10-18 16:07:08 UTC (rev 3046)
+++ branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c	2004-10-18 16:25:36 UTC (rev 3047)
@@ -215,6 +215,8 @@
 		return NT_STATUS_NO_MEMORY;
 	}
 
+	while (fname[0] == '\\') fname++;
+
 	p->pipe_name = talloc_asprintf(p, "\\pipe\\%s", fname);
 	if (!p->pipe_name) {
 		talloc_free(p);
@@ -240,6 +242,7 @@
 	  finalised for Samba4
 	*/
 
+	printf("FINDING: %s\n", p->pipe_name);
 	ep_description.type = ENDPOINT_SMB;
 	ep_description.info.smb_pipe = p->pipe_name;
 
@@ -303,10 +306,6 @@
 	NTSTATUS status;
 	const char *fname = oi->openx.in.fname;
 
-	if (strncasecmp(fname, "PIPE\\", 5) != 0) {
-		return NT_STATUS_OBJECT_NAME_NOT_FOUND;
-	}
-
 	status = ipc_open_generic(ntvfs, req, fname, &p);
 	if (!NT_STATUS_IS_OK(status)) {
 		return status;



More information about the samba-cvs mailing list