OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "sandbox/src/registry_policy.h" | 7 #include "sandbox/src/registry_policy.h" |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/scoped_handle_win.h" | |
11 #include "sandbox/src/ipc_tags.h" | 10 #include "sandbox/src/ipc_tags.h" |
12 #include "sandbox/src/policy_engine_opcodes.h" | 11 #include "sandbox/src/policy_engine_opcodes.h" |
13 #include "sandbox/src/policy_params.h" | 12 #include "sandbox/src/policy_params.h" |
14 #include "sandbox/src/sandbox_utils.h" | 13 #include "sandbox/src/sandbox_utils.h" |
15 #include "sandbox/src/sandbox_types.h" | 14 #include "sandbox/src/sandbox_types.h" |
16 #include "sandbox/src/win_utils.h" | 15 #include "sandbox/src/win_utils.h" |
17 | 16 |
18 namespace { | 17 namespace { |
19 | 18 |
20 static const DWORD kAllowedRegFlags = KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | | 19 static const DWORD kAllowedRegFlags = KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 UNICODE_STRING uni_name = {0}; | 218 UNICODE_STRING uni_name = {0}; |
220 OBJECT_ATTRIBUTES obj_attributes = {0}; | 219 OBJECT_ATTRIBUTES obj_attributes = {0}; |
221 InitObjectAttribs(key, attributes, root_directory, &obj_attributes, | 220 InitObjectAttribs(key, attributes, root_directory, &obj_attributes, |
222 &uni_name); | 221 &uni_name); |
223 *nt_status = NtOpenKeyInTarget(handle, desired_access, &obj_attributes, | 222 *nt_status = NtOpenKeyInTarget(handle, desired_access, &obj_attributes, |
224 client_info.process); | 223 client_info.process); |
225 return true; | 224 return true; |
226 } | 225 } |
227 | 226 |
228 } // namespace sandbox | 227 } // namespace sandbox |
OLD | NEW |