| 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 |
| 11 namespace sandbox { | 11 namespace sandbox { |
| 12 | 12 |
| 13 // This is the concrete resolver used to perform service-call type functions | 13 // This is the concrete resolver used to perform service-call type functions |
| 14 // inside ntdll.dll. | 14 // inside ntdll.dll. |
| 15 class ServiceResolverThunk : public ResolverThunk { | 15 class ServiceResolverThunk : public ResolverThunk { |
| 16 public: | 16 public: |
| 17 // The service resolver needs a child process to write to. | 17 // The service resolver needs a child process to write to. |
| 18 ServiceResolverThunk(HANDLE process, bool relaxed) | 18 ServiceResolverThunk(HANDLE process, bool relaxed) |
| 19 : process_(process), ntdll_base_(NULL), | 19 : ntdll_base_(NULL), |
| 20 relaxed_(relaxed), relative_jump_(0) {} | 20 process_(process), |
| 21 relaxed_(relaxed), |
| 22 relative_jump_(0) {} |
| 21 ~ServiceResolverThunk() override {} | 23 ~ServiceResolverThunk() override {} |
| 22 | 24 |
| 23 // Implementation of Resolver::Setup. | 25 // Implementation of Resolver::Setup. |
| 24 NTSTATUS Setup(const void* target_module, | 26 NTSTATUS Setup(const void* target_module, |
| 25 const void* interceptor_module, | 27 const void* interceptor_module, |
| 26 const char* target_name, | 28 const char* target_name, |
| 27 const char* interceptor_name, | 29 const char* interceptor_name, |
| 28 const void* interceptor_entry_point, | 30 const void* interceptor_entry_point, |
| 29 void* thunk_storage, | 31 void* thunk_storage, |
| 30 size_t storage_bytes, | 32 size_t storage_bytes, |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 private: | 132 private: |
| 131 bool IsFunctionAService(void* local_thunk) const override; | 133 bool IsFunctionAService(void* local_thunk) const override; |
| 132 | 134 |
| 133 DISALLOW_COPY_AND_ASSIGN(Win8ResolverThunk); | 135 DISALLOW_COPY_AND_ASSIGN(Win8ResolverThunk); |
| 134 }; | 136 }; |
| 135 | 137 |
| 136 } // namespace sandbox | 138 } // namespace sandbox |
| 137 | 139 |
| 138 | 140 |
| 139 #endif // SANDBOX_SRC_SERVICE_RESOLVER_H__ | 141 #endif // SANDBOX_SRC_SERVICE_RESOLVER_H__ |
| OLD | NEW |