| 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_WIN_SRC_TARGET_PROCESS_H_ | 5 #ifndef SANDBOX_WIN_SRC_TARGET_PROCESS_H_ |
| 6 #define SANDBOX_WIN_SRC_TARGET_PROCESS_H_ | 6 #define SANDBOX_WIN_SRC_TARGET_PROCESS_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.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 | 96 |
| 97 // Transfers a 32-bit variable between the broker and the target. | 97 // Transfers a 32-bit variable between the broker and the target. |
| 98 ResultCode TransferVariable(const char* name, void* address, size_t size); | 98 ResultCode TransferVariable(const char* name, void* address, size_t size); |
| 99 | 99 |
| 100 private: | 100 private: |
| 101 // Details of the target process. | 101 // Details of the target process. |
| 102 base::win::ScopedProcessInformation sandbox_process_info_; | 102 base::win::ScopedProcessInformation sandbox_process_info_; |
| 103 // The token associated with the process. It provides the core of the | 103 // The token associated with the process. It provides the core of the |
| 104 // sbox security. | 104 // sbox security. |
| 105 base::win::ScopedHandle lockdown_token_; | 105 base::win::ScopedHandle lockdown_token_; |
| 106 // The token given to the initial thread so that the target process can |
| 107 // start. It has more powers than the lockdown_token. |
| 108 base::win::ScopedHandle initial_token_; |
| 106 // The lowbox token associated with the process. This token is set after the | 109 // The lowbox token associated with the process. This token is set after the |
| 107 // process creation. | 110 // process creation. |
| 108 base::win::ScopedHandle lowbox_token_; | 111 base::win::ScopedHandle lowbox_token_; |
| 109 // The token given to the initial thread so that the target process can | |
| 110 // start. It has more powers than the lockdown_token. | |
| 111 base::win::ScopedHandle initial_token_; | |
| 112 // Kernel handle to the shared memory used by the IPC server. | 112 // Kernel handle to the shared memory used by the IPC server. |
| 113 base::win::ScopedHandle shared_section_; | 113 base::win::ScopedHandle shared_section_; |
| 114 // Job object containing the target process. | 114 // Job object containing the target process. |
| 115 HANDLE job_; | 115 HANDLE job_; |
| 116 // Reference to the IPC subsystem. | 116 // Reference to the IPC subsystem. |
| 117 scoped_ptr<SharedMemIPCServer> ipc_server_; | 117 scoped_ptr<SharedMemIPCServer> ipc_server_; |
| 118 // Provides the threads used by the IPC. This class does not own this pointer. | 118 // Provides the threads used by the IPC. This class does not own this pointer. |
| 119 ThreadProvider* thread_pool_; | 119 ThreadProvider* thread_pool_; |
| 120 // Base address of the main executable | 120 // Base address of the main executable |
| 121 void* base_address_; | 121 void* base_address_; |
| 122 // Full name of the target executable. | 122 // Full name of the target executable. |
| 123 scoped_ptr<wchar_t, base::FreeDeleter> exe_name_; | 123 scoped_ptr<wchar_t, base::FreeDeleter> exe_name_; |
| 124 | 124 |
| 125 // Function used for testing. | 125 // Function used for testing. |
| 126 friend TargetProcess* MakeTestTargetProcess(HANDLE process, | 126 friend TargetProcess* MakeTestTargetProcess(HANDLE process, |
| 127 HMODULE base_address); | 127 HMODULE base_address); |
| 128 | 128 |
| 129 DISALLOW_IMPLICIT_CONSTRUCTORS(TargetProcess); | 129 DISALLOW_IMPLICIT_CONSTRUCTORS(TargetProcess); |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 // Creates a mock TargetProcess used for testing interceptions. | 132 // Creates a mock TargetProcess used for testing interceptions. |
| 133 // TODO(cpu): It seems that this method is not going to be used anymore. | 133 // TODO(cpu): It seems that this method is not going to be used anymore. |
| 134 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address); | 134 TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address); |
| 135 | 135 |
| 136 | 136 |
| 137 } // namespace sandbox | 137 } // namespace sandbox |
| 138 | 138 |
| 139 #endif // SANDBOX_WIN_SRC_TARGET_PROCESS_H_ | 139 #endif // SANDBOX_WIN_SRC_TARGET_PROCESS_H_ |
| OLD | NEW |