summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c8
1 files changed, 6 insertions, 2 deletions
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);