OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |