OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SANDBOX_SRC_WIN_PROCESS_MITIGATIONS_H_ |
| 6 #define SANDBOX_SRC_WIN_PROCESS_MITIGATIONS_H_ |
| 7 |
| 8 #include <windows.h> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 |
| 12 namespace sandbox { |
| 13 |
| 14 // Returns the flags that must be enforced after startup. |
| 15 uint64 GetPostStartupProcessMitigations(uint64 flags); |
| 16 |
| 17 // Converts sandbox flags to the PROC_THREAD_ATTRIBUTE_SECURITY_CAPABILITIES |
| 18 // flags used by UpdateProcThreadAttribute(). |
| 19 DWORD64 GetProcessMitigationPolicyFlags(uint64 flags); |
| 20 |
| 21 // Sets the mitigation policy for the current process, ignoring any settings |
| 22 // that are invalid for the current version of Windows. |
| 23 bool SetProcessMitigationsForCurrentProcess(uint64 flags); |
| 24 |
| 25 // Adds mitigations that need to be performed on the suspended target process |
| 26 // before execution begins. |
| 27 bool SetProcessMitigationsForSuspendedProcess(HANDLE process, uint64 flags); |
| 28 |
| 29 // Returns true if all the supplied flags can be set after a process starts. |
| 30 bool CanSetProcessMitigationsPostStartup(uint64 flags); |
| 31 |
| 32 // Returns true if all the supplied flags can be set before a process starts. |
| 33 bool CanSetProcessMitigationsPreStartup(uint64 flags); |
| 34 |
| 35 } // namespace sandbox |
| 36 |
| 37 #endif // SANDBOX_SRC_WIN_PROCESS_MITIGATIONS_H_ |
| 38 |
OLD | NEW |