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 #include "sandbox/win/src/process_mitigations.h" | 5 #include "sandbox/win/src/process_mitigations.h" |
6 | 6 |
7 #include <stddef.h> | |
8 | |
9 #include <algorithm> | 7 #include <algorithm> |
10 | 8 |
11 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
12 #include "sandbox/win/src/nt_internals.h" | 10 #include "sandbox/win/src/nt_internals.h" |
13 #include "sandbox/win/src/restricted_token_utils.h" | 11 #include "sandbox/win/src/restricted_token_utils.h" |
14 #include "sandbox/win/src/sandbox_rand.h" | 12 #include "sandbox/win/src/sandbox_rand.h" |
15 #include "sandbox/win/src/win_utils.h" | 13 #include "sandbox/win/src/win_utils.h" |
16 | 14 |
17 namespace { | 15 namespace { |
18 | 16 |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 } | 322 } |
325 | 323 |
326 bool CanSetProcessMitigationsPreStartup(MitigationFlags flags) { | 324 bool CanSetProcessMitigationsPreStartup(MitigationFlags flags) { |
327 // These mitigations cannot be enabled prior to startup. | 325 // These mitigations cannot be enabled prior to startup. |
328 return !(flags & (MITIGATION_STRICT_HANDLE_CHECKS | | 326 return !(flags & (MITIGATION_STRICT_HANDLE_CHECKS | |
329 MITIGATION_DLL_SEARCH_ORDER)); | 327 MITIGATION_DLL_SEARCH_ORDER)); |
330 } | 328 } |
331 | 329 |
332 } // namespace sandbox | 330 } // namespace sandbox |
333 | 331 |
OLD | NEW |