| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SANDBOX_POLICY_BASE_H_ | 5 #ifndef SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ |
| 6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ | 6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 void SetStrictInterceptions() override; | 64 void SetStrictInterceptions() override; |
| 65 ResultCode SetStdoutHandle(HANDLE handle) override; | 65 ResultCode SetStdoutHandle(HANDLE handle) override; |
| 66 ResultCode SetStderrHandle(HANDLE handle) override; | 66 ResultCode SetStderrHandle(HANDLE handle) override; |
| 67 ResultCode AddRule(SubSystem subsystem, | 67 ResultCode AddRule(SubSystem subsystem, |
| 68 Semantics semantics, | 68 Semantics semantics, |
| 69 const wchar_t* pattern) override; | 69 const wchar_t* pattern) override; |
| 70 ResultCode AddDllToUnload(const wchar_t* dll_name) override; | 70 ResultCode AddDllToUnload(const wchar_t* dll_name) override; |
| 71 ResultCode AddKernelObjectToClose(const base::char16* handle_type, | 71 ResultCode AddKernelObjectToClose(const base::char16* handle_type, |
| 72 const base::char16* handle_name) override; | 72 const base::char16* handle_name) override; |
| 73 void AddHandleToShare(HANDLE handle) override; | 73 void AddHandleToShare(HANDLE handle) override; |
| 74 void SetLockdownDefaultDacl() override; |
| 74 | 75 |
| 75 // Creates a Job object with the level specified in a previous call to | 76 // Creates a Job object with the level specified in a previous call to |
| 76 // SetJobLevel(). | 77 // SetJobLevel(). |
| 77 ResultCode MakeJobObject(base::win::ScopedHandle* job); | 78 ResultCode MakeJobObject(base::win::ScopedHandle* job); |
| 78 | 79 |
| 79 // Creates the two tokens with the levels specified in a previous call to | 80 // Creates the two tokens with the levels specified in a previous call to |
| 80 // SetTokenLevel(). Also creates a lowbox token if specified based on the | 81 // SetTokenLevel(). Also creates a lowbox token if specified based on the |
| 81 // lowbox SID. | 82 // lowbox SID. |
| 82 ResultCode MakeTokens(base::win::ScopedHandle* initial, | 83 ResultCode MakeTokens(base::win::ScopedHandle* initial, |
| 83 base::win::ScopedHandle* lockdown, | 84 base::win::ScopedHandle* lockdown, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 std::vector<base::string16> blacklisted_dlls_; | 152 std::vector<base::string16> blacklisted_dlls_; |
| 152 // This is a map of handle-types to names that we need to close in the | 153 // This is a map of handle-types to names that we need to close in the |
| 153 // target process. A null set means we need to close all handles of the | 154 // target process. A null set means we need to close all handles of the |
| 154 // given type. | 155 // given type. |
| 155 HandleCloser handle_closer_; | 156 HandleCloser handle_closer_; |
| 156 std::vector<base::string16> capabilities_; | 157 std::vector<base::string16> capabilities_; |
| 157 scoped_ptr<AppContainerAttributes> appcontainer_list_; | 158 scoped_ptr<AppContainerAttributes> appcontainer_list_; |
| 158 PSID lowbox_sid_; | 159 PSID lowbox_sid_; |
| 159 base::win::ScopedHandle lowbox_directory_; | 160 base::win::ScopedHandle lowbox_directory_; |
| 160 scoped_ptr<Dispatcher> dispatcher_; | 161 scoped_ptr<Dispatcher> dispatcher_; |
| 162 bool lockdown_default_dacl_; |
| 161 | 163 |
| 162 static HDESK alternate_desktop_handle_; | 164 static HDESK alternate_desktop_handle_; |
| 163 static HWINSTA alternate_winstation_handle_; | 165 static HWINSTA alternate_winstation_handle_; |
| 164 static IntegrityLevel alternate_desktop_integrity_level_label_; | 166 static IntegrityLevel alternate_desktop_integrity_level_label_; |
| 165 | 167 |
| 166 // Contains the list of handles being shared with the target process. | 168 // Contains the list of handles being shared with the target process. |
| 167 // This list contains handles other than the stderr/stdout handles which are | 169 // This list contains handles other than the stderr/stdout handles which are |
| 168 // shared with the target at times. | 170 // shared with the target at times. |
| 169 base::HandlesToInheritVector handles_to_share_; | 171 base::HandlesToInheritVector handles_to_share_; |
| 170 | 172 |
| 171 DISALLOW_COPY_AND_ASSIGN(PolicyBase); | 173 DISALLOW_COPY_AND_ASSIGN(PolicyBase); |
| 172 }; | 174 }; |
| 173 | 175 |
| 174 } // namespace sandbox | 176 } // namespace sandbox |
| 175 | 177 |
| 176 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ | 178 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ |
| OLD | NEW |