Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Side by Side Diff: sandbox/win/src/policy_broker.cc

Issue 1814863004: Cleanup/Remove Windows XP/Vista version checks from Windows sandbox code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert disabled reparse point check Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sandbox/win/src/named_pipe_policy_test.cc ('k') | sandbox/win/src/policy_target_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // This one is also provided by process_thread_policy.
114 // Bug 27218: We don't have dispatch for some x64 syscalls. 114 if (!INTERCEPT_NT(manager, NtOpenProcessTokenEx, OPEN_PROCESS_TOKEN_EX_ID,
115 // This one is also provided by process_thread_policy. 115 20))
116 if (!INTERCEPT_NT(manager, NtOpenProcessTokenEx, OPEN_PROCESS_TOKEN_EX_ID, 116 return false;
117 20))
118 return false;
119 117
120 if (!INTERCEPT_NT(manager, NtOpenThreadTokenEx, OPEN_THREAD_TOKEN_EX_ID, 118 if (!INTERCEPT_NT(manager, NtOpenThreadTokenEx, OPEN_THREAD_TOKEN_EX_ID,
121 24)) 119 24))
122 return false; 120 return false;
123 }
124 121
125 if (!is_csrss_connected) { 122 if (!is_csrss_connected) {
126 if (!INTERCEPT_EAT(manager, kKerneldllName, CreateThread, CREATE_THREAD_ID, 123 if (!INTERCEPT_EAT(manager, kKerneldllName, CreateThread, CREATE_THREAD_ID,
127 28)) 124 28))
128 return false; 125 return false;
129 } 126 }
130 127
131 return true; 128 return true;
132 } 129 }
133 130
134 } // namespace sandbox 131 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/src/named_pipe_policy_test.cc ('k') | sandbox/win/src/policy_target_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698