Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: sandbox/win/src/filesystem_dispatcher.cc

Issue 890643002: Initialize create_disposition to FILE_OPEN in sandbox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sandbox/win/src/filesystem_dispatcher.h" 5 #include "sandbox/win/src/filesystem_dispatcher.h"
6 6
7 #include "sandbox/win/src/crosscall_client.h" 7 #include "sandbox/win/src/crosscall_client.h"
8 #include "sandbox/win/src/filesystem_interception.h" 8 #include "sandbox/win/src/filesystem_interception.h"
9 #include "sandbox/win/src/filesystem_policy.h" 9 #include "sandbox/win/src/filesystem_policy.h"
10 #include "sandbox/win/src/interception.h" 10 #include "sandbox/win/src/interception.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 uint32 open_options) { 138 uint32 open_options) {
139 if (!PreProcessName(*name, name)) { 139 if (!PreProcessName(*name, name)) {
140 // The path requested might contain a reparse point. 140 // The path requested might contain a reparse point.
141 ipc->return_info.nt_status = STATUS_ACCESS_DENIED; 141 ipc->return_info.nt_status = STATUS_ACCESS_DENIED;
142 return true; 142 return true;
143 } 143 }
144 144
145 const wchar_t* filename = name->c_str(); 145 const wchar_t* filename = name->c_str();
146 146
147 uint32 broker = TRUE; 147 uint32 broker = TRUE;
148 uint32 create_disposition = 0; 148 uint32 create_disposition = FILE_OPEN;
149 CountedParameterSet<OpenFile> params; 149 CountedParameterSet<OpenFile> params;
150 params[OpenFile::NAME] = ParamPickerMake(filename); 150 params[OpenFile::NAME] = ParamPickerMake(filename);
151 params[OpenFile::ACCESS] = ParamPickerMake(desired_access); 151 params[OpenFile::ACCESS] = ParamPickerMake(desired_access);
152 params[OpenFile::DISPOSITION] = ParamPickerMake(create_disposition); 152 params[OpenFile::DISPOSITION] = ParamPickerMake(create_disposition);
153 params[OpenFile::OPTIONS] = ParamPickerMake(open_options); 153 params[OpenFile::OPTIONS] = ParamPickerMake(open_options);
154 params[OpenFile::BROKER] = ParamPickerMake(broker); 154 params[OpenFile::BROKER] = ParamPickerMake(broker);
155 155
156 // To evaluate the policy we need to call back to the policy object. We 156 // To evaluate the policy we need to call back to the policy object. We
157 // are just middlemen in the operation since is the FileSystemPolicy which 157 // are just middlemen in the operation since is the FileSystemPolicy which
158 // knows what to do. 158 // knows what to do.
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 ipc->return_info.nt_status = STATUS_ACCESS_DENIED; 305 ipc->return_info.nt_status = STATUS_ACCESS_DENIED;
306 return true; 306 return true;
307 } 307 }
308 308
309 // Return operation status on the IPC. 309 // Return operation status on the IPC.
310 ipc->return_info.nt_status = nt_status; 310 ipc->return_info.nt_status = nt_status;
311 return true; 311 return true;
312 } 312 }
313 313
314 } // namespace sandbox 314 } // namespace sandbox
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698