diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-05-28 19:44:04 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-05-28 21:48:47 +0200 |
commit | e4c59a66aa8ea113c38cc9c2f04a825983ee4fdc (patch) | |
tree | 919d72f89fe622c85780e413245bb4f861f27185 | |
parent | ac4d23ebeb21c5f00c13b79c17c666ac54b6f08d (diff) | |
download | samba-e4c59a66aa8ea113c38cc9c2f04a825983ee4fdc.tar.gz samba-e4c59a66aa8ea113c38cc9c2f04a825983ee4fdc.tar.bz2 samba-e4c59a66aa8ea113c38cc9c2f04a825983ee4fdc.zip |
s4:ntvfs/ipc: fix protocol specific processing of pipe names
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon May 28 21:48:47 CEST 2012 on sn-devel-104
-rw-r--r-- | source4/ntvfs/ipc/vfs_ipc.c | 8 |
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); |