| OLD | NEW |
| 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 Loading... |
| 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 // Copies the unicode string passed in to |out_string|. |
| 107 NTSTATUS AllocAndCopyUnicodeString(const UNICODE_STRING* in_string, |
| 108 wchar_t** out_string); |
| 109 |
| 106 // Determine full path name from object root and path. | 110 // Determine full path name from object root and path. |
| 107 NTSTATUS AllocAndGetFullPath(HANDLE root, | 111 NTSTATUS AllocAndGetFullPath(HANDLE root, |
| 108 wchar_t* path, | 112 wchar_t* path, |
| 109 wchar_t** full_path); | 113 wchar_t** full_path); |
| 110 | 114 |
| 111 // Initializes our ntdll level heap | 115 // Initializes our ntdll level heap |
| 112 bool InitHeap(); | 116 bool InitHeap(); |
| 113 | 117 |
| 114 // Returns true if the provided handle refers to the current process. | 118 // Returns true if the provided handle refers to the current process. |
| 115 bool IsSameProcess(HANDLE process); | 119 bool IsSameProcess(HANDLE process); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 186 |
| 183 // Returns true if the file_rename_information structure is supported by our | 187 // Returns true if the file_rename_information structure is supported by our |
| 184 // rename handler. | 188 // rename handler. |
| 185 bool IsSupportedRenameCall(FILE_RENAME_INFORMATION* file_info, DWORD length, | 189 bool IsSupportedRenameCall(FILE_RENAME_INFORMATION* file_info, DWORD length, |
| 186 uint32 file_info_class); | 190 uint32 file_info_class); |
| 187 | 191 |
| 188 } // namespace sandbox | 192 } // namespace sandbox |
| 189 | 193 |
| 190 | 194 |
| 191 #endif // SANDBOX_SRC_SANDBOX_NT_UTIL_H__ | 195 #endif // SANDBOX_SRC_SANDBOX_NT_UTIL_H__ |
| OLD | NEW |