From e4c59a66aa8ea113c38cc9c2f04a825983ee4fdc Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 28 May 2012 19:44:04 +0200 Subject: s4:ntvfs/ipc: fix protocol specific processing of pipe names metze Autobuild-User: Stefan Metzmacher Autobuild-Date: Mon May 28 21:48:47 CEST 2012 on sn-devel-104 --- source4/ntvfs/ipc/vfs_ipc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs') diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c index 5905e0cbaf..7fc3b14884 100644 --- a/source4/ntvfs/ipc/vfs_ipc.c +++ b/source4/ntvfs/ipc/vfs_ipc.c @@ -260,9 +260,15 @@ static NTSTATUS ipc_open(struct ntvfs_module_context *ntvfs, case RAW_OPEN_NTCREATEX: case RAW_OPEN_NTTRANS_CREATE: fname = oi->ntcreatex.in.fname; + while (fname[0] == '\\') fname++; break; case RAW_OPEN_OPENX: fname = oi->openx.in.fname; + while (fname[0] == '\\') fname++; + if (strncasecmp(fname, "PIPE\\", 5) != 0) { + return NT_STATUS_OBJECT_PATH_SYNTAX_BAD; + } + while (fname[0] == '\\') fname++; break; case RAW_OPEN_SMB2: fname = oi->smb2.in.fname; @@ -284,8 +290,6 @@ static NTSTATUS ipc_open(struct ntvfs_module_context *ntvfs, p = talloc(h, struct pipe_state); NT_STATUS_HAVE_NO_MEMORY(p); - while (fname[0] == '\\') fname++; - /* check for valid characters in name */ fname = strlower_talloc(p, fname); -- cgit