Chromium Code Reviews| Index: sandbox/win/src/named_pipe_dispatcher.cc |
| diff --git a/sandbox/win/src/named_pipe_dispatcher.cc b/sandbox/win/src/named_pipe_dispatcher.cc |
| index 54b3162bfa57fa13baa27b003b17fb03fa3f1b7a..22ba795e96cdab3ee9e7c148b27df04bdaa2dba9 100644 |
| --- a/sandbox/win/src/named_pipe_dispatcher.cc |
| +++ b/sandbox/win/src/named_pipe_dispatcher.cc |
| @@ -43,6 +43,9 @@ bool NamedPipeDispatcher::CreateNamedPipe( |
| IPCInfo* ipc, base::string16* name, DWORD open_mode, DWORD pipe_mode, |
| DWORD max_instances, DWORD out_buffer_size, DWORD in_buffer_size, |
| DWORD default_timeout) { |
| + ipc->return_info.win32_result = ERROR_ACCESS_DENIED; |
| + ipc->return_info.handle = INVALID_HANDLE_VALUE; |
| + |
| const wchar_t* pipe_name = name->c_str(); |
| CountedParameterSet<NameBased> params; |
| params[NameBased::NAME] = ParamPickerMake(pipe_name); |
| @@ -50,6 +53,13 @@ bool NamedPipeDispatcher::CreateNamedPipe( |
| EvalResult eval = policy_base_->EvalPolicy(IPC_CREATENAMEDPIPEW_TAG, |
| params.GetBase()); |
| + // "For file I/O, the "\\?\" prefix to a path string tells the Windows APIs to |
| + // disable all string parsing and to send the string that follows it straight |
| + // to the file system." |
| + // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx |
| + if (name->compare(0, 4, L"\\\\.\\") == 0) |
| + name->replace(0, 4, L"\\\\\?\\"); |
| + |
|
jschuh
2014/01/24 22:53:33
I thought we discussed having the dispatcher also
|
| HANDLE pipe; |
| DWORD ret = NamedPipePolicy::CreateNamedPipeAction(eval, *ipc->client_info, |
| *name, open_mode, |