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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "sandbox/win/src/policy_broker.h" | 9 #include "sandbox/win/src/policy_broker.h" |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 !INTERCEPT_NT(manager, NtOpenProcess, OPEN_PROCESS_ID, 20) || | 103 !INTERCEPT_NT(manager, NtOpenProcess, OPEN_PROCESS_ID, 20) || |
104 !INTERCEPT_NT(manager, NtOpenProcessToken, OPEN_PROCESS_TOKEN_ID, 16)) | 104 !INTERCEPT_NT(manager, NtOpenProcessToken, OPEN_PROCESS_TOKEN_ID, 16)) |
105 return false; | 105 return false; |
106 | 106 |
107 // Interceptions with neither policy nor IPC. | 107 // Interceptions with neither policy nor IPC. |
108 if (!INTERCEPT_NT(manager, NtSetInformationThread, SET_INFORMATION_THREAD_ID, | 108 if (!INTERCEPT_NT(manager, NtSetInformationThread, SET_INFORMATION_THREAD_ID, |
109 20) || | 109 20) || |
110 !INTERCEPT_NT(manager, NtOpenThreadToken, OPEN_THREAD_TOKEN_ID, 20)) | 110 !INTERCEPT_NT(manager, NtOpenThreadToken, OPEN_THREAD_TOKEN_ID, 20)) |
111 return false; | 111 return false; |
112 | 112 |
113 if (base::win::GetVersion() >= base::win::VERSION_XP) { | 113 // Bug 27218: We don't have dispatch for some x64 syscalls. |
Will Harris
2016/03/17 23:05:58
this bug appears to be fixed, can this comment be
kylix_rd
2016/03/21 19:09:09
Done.
| |
114 // Bug 27218: We don't have dispatch for some x64 syscalls. | 114 // This one is also provided by process_thread_policy. |
115 // This one is also provided by process_thread_policy. | 115 if (!INTERCEPT_NT(manager, NtOpenProcessTokenEx, OPEN_PROCESS_TOKEN_EX_ID, |
116 if (!INTERCEPT_NT(manager, NtOpenProcessTokenEx, OPEN_PROCESS_TOKEN_EX_ID, | 116 20)) |
117 20)) | 117 return false; |
118 return false; | |
119 | 118 |
120 if (!INTERCEPT_NT(manager, NtOpenThreadTokenEx, OPEN_THREAD_TOKEN_EX_ID, | 119 if (!INTERCEPT_NT(manager, NtOpenThreadTokenEx, OPEN_THREAD_TOKEN_EX_ID, |
121 24)) | 120 24)) |
122 return false; | 121 return false; |
123 } | |
124 | 122 |
125 if (!is_csrss_connected) { | 123 if (!is_csrss_connected) { |
126 if (!INTERCEPT_EAT(manager, kKerneldllName, CreateThread, CREATE_THREAD_ID, | 124 if (!INTERCEPT_EAT(manager, kKerneldllName, CreateThread, CREATE_THREAD_ID, |
127 28)) | 125 28)) |
128 return false; | 126 return false; |
129 } | 127 } |
130 | 128 |
131 return true; | 129 return true; |
132 } | 130 } |
133 | 131 |
134 } // namespace sandbox | 132 } // namespace sandbox |
OLD | NEW |