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

Side by Side Diff: sandbox/win/src/sandbox_nt_util.h

Issue 700373005: Check within target process for policy match on registry intercepts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. fix dcheck Created 6 years, 1 month 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 | « sandbox/win/src/registry_interception.cc ('k') | sandbox/win/src/sandbox_nt_util.cc » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef SANDBOX_SRC_SANDBOX_NT_UTIL_H_ 5 #ifndef SANDBOX_SRC_SANDBOX_NT_UTIL_H_
6 #define SANDBOX_SRC_SANDBOX_NT_UTIL_H_ 6 #define SANDBOX_SRC_SANDBOX_NT_UTIL_H_
7 7
8 #include <intrin.h> 8 #include <intrin.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // write) 96 // write)
97 bool ValidParameter(void* buffer, size_t size, RequiredAccess intent); 97 bool ValidParameter(void* buffer, size_t size, RequiredAccess intent);
98 98
99 // Copies data from a user buffer to our buffer. Returns the operation status. 99 // Copies data from a user buffer to our buffer. Returns the operation status.
100 NTSTATUS CopyData(void* destination, const void* source, size_t bytes); 100 NTSTATUS CopyData(void* destination, const void* source, size_t bytes);
101 101
102 // Copies the name from an object attributes. 102 // Copies the name from an object attributes.
103 NTSTATUS AllocAndCopyName(const OBJECT_ATTRIBUTES* in_object, 103 NTSTATUS AllocAndCopyName(const OBJECT_ATTRIBUTES* in_object,
104 wchar_t** out_name, uint32* attributes, HANDLE* root); 104 wchar_t** out_name, uint32* attributes, HANDLE* root);
105 105
106 // Determine full path name from object root and path.
107 NTSTATUS AllocAndGetFullPath(HANDLE root,
108 wchar_t* path,
109 wchar_t** full_path);
110
106 // Initializes our ntdll level heap 111 // Initializes our ntdll level heap
107 bool InitHeap(); 112 bool InitHeap();
108 113
109 // Returns true if the provided handle refers to the current process. 114 // Returns true if the provided handle refers to the current process.
110 bool IsSameProcess(HANDLE process); 115 bool IsSameProcess(HANDLE process);
111 116
112 enum MappedModuleFlags { 117 enum MappedModuleFlags {
113 MODULE_IS_PE_IMAGE = 1, // Module is an executable. 118 MODULE_IS_PE_IMAGE = 1, // Module is an executable.
114 MODULE_HAS_ENTRY_POINT = 2, // Execution entry point found. 119 MODULE_HAS_ENTRY_POINT = 2, // Execution entry point found.
115 MODULE_HAS_CODE = 4 // Non zero size of executable sections. 120 MODULE_HAS_CODE = 4 // Non zero size of executable sections.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 182
178 // Returns true if the file_rename_information structure is supported by our 183 // Returns true if the file_rename_information structure is supported by our
179 // rename handler. 184 // rename handler.
180 bool IsSupportedRenameCall(FILE_RENAME_INFORMATION* file_info, DWORD length, 185 bool IsSupportedRenameCall(FILE_RENAME_INFORMATION* file_info, DWORD length,
181 uint32 file_info_class); 186 uint32 file_info_class);
182 187
183 } // namespace sandbox 188 } // namespace sandbox
184 189
185 190
186 #endif // SANDBOX_SRC_SANDBOX_NT_UTIL_H__ 191 #endif // SANDBOX_SRC_SANDBOX_NT_UTIL_H__
OLDNEW
« no previous file with comments | « sandbox/win/src/registry_interception.cc ('k') | sandbox/win/src/sandbox_nt_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698