OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SERVICE_RESOLVER_H__ | 5 #ifndef SANDBOX_SRC_SERVICE_RESOLVER_H__ |
6 #define SANDBOX_SRC_SERVICE_RESOLVER_H__ | 6 #define SANDBOX_SRC_SERVICE_RESOLVER_H__ |
7 | 7 |
8 #include "sandbox/win/src/nt_internals.h" | 8 #include "sandbox/win/src/nt_internals.h" |
9 #include "sandbox/win/src/resolver.h" | 9 #include "sandbox/win/src/resolver.h" |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 virtual NTSTATUS ResolveTarget(const void* module, | 39 virtual NTSTATUS ResolveTarget(const void* module, |
40 const char* function_name, | 40 const char* function_name, |
41 void** address); | 41 void** address); |
42 | 42 |
43 // Implementation of Resolver::GetThunkSize. | 43 // Implementation of Resolver::GetThunkSize. |
44 virtual size_t GetThunkSize() const; | 44 virtual size_t GetThunkSize() const; |
45 | 45 |
46 // Call this to set up ntdll_base_ which will allow for local patches. | 46 // Call this to set up ntdll_base_ which will allow for local patches. |
47 virtual void AllowLocalPatches(); | 47 virtual void AllowLocalPatches(); |
48 | 48 |
| 49 // Verify that the function specified by |target_name| in |target_module| is a |
| 50 // service and copy the first |storage_bytes| of data from that function into |
| 51 // |thunk_storage|. |
| 52 virtual NTSTATUS CopyThunk(const void* target_module, |
| 53 const char* target_name, |
| 54 BYTE* thunk_storage, |
| 55 size_t storage_bytes, |
| 56 size_t* storage_used); |
| 57 |
49 protected: | 58 protected: |
50 // The unit test will use this member to allow local patch on a buffer. | 59 // The unit test will use this member to allow local patch on a buffer. |
51 HMODULE ntdll_base_; | 60 HMODULE ntdll_base_; |
52 | 61 |
53 // Handle of the child process. | 62 // Handle of the child process. |
54 HANDLE process_; | 63 HANDLE process_; |
55 | 64 |
56 protected: | 65 protected: |
57 // Keeps track of a Windows 2000 resolver. | 66 // Keeps track of a Windows 2000 resolver. |
58 bool win2k_; | 67 bool win2k_; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 private: | 151 private: |
143 virtual bool IsFunctionAService(void* local_thunk) const; | 152 virtual bool IsFunctionAService(void* local_thunk) const; |
144 | 153 |
145 DISALLOW_COPY_AND_ASSIGN(Win8ResolverThunk); | 154 DISALLOW_COPY_AND_ASSIGN(Win8ResolverThunk); |
146 }; | 155 }; |
147 | 156 |
148 } // namespace sandbox | 157 } // namespace sandbox |
149 | 158 |
150 | 159 |
151 #endif // SANDBOX_SRC_SERVICE_RESOLVER_H__ | 160 #endif // SANDBOX_SRC_SERVICE_RESOLVER_H__ |
OLD | NEW |