Index: sandbox/win/src/process_mitigations.h |
=================================================================== |
--- sandbox/win/src/process_mitigations.h (revision 0) |
+++ sandbox/win/src/process_mitigations.h (revision 0) |
@@ -0,0 +1,38 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef SANDBOX_SRC_WIN_PROCESS_MITIGATIONS_H_ |
+#define SANDBOX_SRC_WIN_PROCESS_MITIGATIONS_H_ |
+ |
+#include <windows.h> |
+ |
+#include "base/basictypes.h" |
+ |
+namespace sandbox { |
+ |
+// Returns the flags that must be enforced after startup. |
+uint64 GetPostStartupProcessMitigations(uint64 flags); |
rvargas (doing something else)
2012/09/08 02:23:32
It is not clear, from reading this file, what are
rvargas (doing something else)
2012/09/08 02:23:32
btw, make sure the order on the header matches the
|
+ |
+// Converts sandbox flags to the PROC_THREAD_ATTRIBUTE_SECURITY_CAPABILITIES |
+// flags used by UpdateProcThreadAttribute(). |
+DWORD64 GetProcessMitigationPolicyFlags(uint64 flags); |
rvargas (doing something else)
2012/09/08 02:23:32
This looks really weird... convert from uint64 to
jschuh
2012/09/10 23:58:48
I need windows.h for the HANDLE regardless. Howeve
|
+ |
+// Sets the mitigation policy for the current process, ignoring any settings |
+// that are invalid for the current version of Windows. |
+bool SetProcessMitigationsForCurrentProcess(uint64 flags); |
+ |
+// Adds mitigations that need to be performed on the suspended target process |
+// before execution begins. |
+bool SetProcessMitigationsForSuspendedProcess(HANDLE process, uint64 flags); |
+ |
+// Returns true if all the supplied flags can be set after a process starts. |
+bool CanSetProcessMitigationsPostStartup(uint64 flags); |
+ |
+// Returns true if all the supplied flags can be set before a process starts. |
+bool CanSetProcessMitigationsPreStartup(uint64 flags); |
+ |
+} // namespace sandbox |
+ |
+#endif // SANDBOX_SRC_WIN_PROCESS_MITIGATIONS_H_ |
+ |