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

Side by Side Diff: sandbox/win/src/sandbox_policy.h

Issue 937353002: Adding method to create process using LowBox token in sandbox code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comment inside target_process. Created 5 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
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 #ifndef SANDBOX_WIN_SRC_SANDBOX_POLICY_H_ 5 #ifndef SANDBOX_WIN_SRC_SANDBOX_POLICY_H_
6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_H_ 6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // launching the sandboxed process will fail. See BrokerServices for details 176 // launching the sandboxed process will fail. See BrokerServices for details
177 // about installing an AppContainer. 177 // about installing an AppContainer.
178 // Note that currently Windows restricts the use of impersonation within 178 // Note that currently Windows restricts the use of impersonation within
179 // AppContainers, so this function is incompatible with the use of an initial 179 // AppContainers, so this function is incompatible with the use of an initial
180 // token. 180 // token.
181 virtual ResultCode SetAppContainer(const wchar_t* sid) = 0; 181 virtual ResultCode SetAppContainer(const wchar_t* sid) = 0;
182 182
183 // Sets a capability to be enabled for the sandboxed process' AppContainer. 183 // Sets a capability to be enabled for the sandboxed process' AppContainer.
184 virtual ResultCode SetCapability(const wchar_t* sid) = 0; 184 virtual ResultCode SetCapability(const wchar_t* sid) = 0;
185 185
186 // Sets the LowBox token for sandboxed process. This is mutually exclusive
187 // with SetAppContainer method. So far there are two methods to start
rvargas (doing something else) 2015/02/28 01:10:06 nit: I think we can drop the second sentence.
Shrikant Kelkar 2015/02/28 01:55:41 Done.
188 // appcontainer process, one through startupinfoex and other using
189 // createlowboxtoken.
190 virtual ResultCode SetLowBox(const wchar_t* sid) = 0;
191
186 // Sets the mitigations enabled when the process is created. Most of these 192 // Sets the mitigations enabled when the process is created. Most of these
187 // are implemented as attributes passed via STARTUPINFOEX. So they take 193 // are implemented as attributes passed via STARTUPINFOEX. So they take
188 // effect before any thread in the target executes. The declaration of 194 // effect before any thread in the target executes. The declaration of
189 // MitigationFlags is followed by a detailed description of each flag. 195 // MitigationFlags is followed by a detailed description of each flag.
190 virtual ResultCode SetProcessMitigations(MitigationFlags flags) = 0; 196 virtual ResultCode SetProcessMitigations(MitigationFlags flags) = 0;
191 197
192 // Returns the currently set mitigation flags. 198 // Returns the currently set mitigation flags.
193 virtual MitigationFlags GetProcessMitigations() = 0; 199 virtual MitigationFlags GetProcessMitigations() = 0;
194 200
195 // Sets process mitigation flags that don't take effect before the call to 201 // Sets process mitigation flags that don't take effect before the call to
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // A NULL value for handle_name indicates all handles of the specified type. 243 // A NULL value for handle_name indicates all handles of the specified type.
238 // An empty string for handle_name indicates the handle is unnamed. 244 // An empty string for handle_name indicates the handle is unnamed.
239 virtual ResultCode AddKernelObjectToClose(const wchar_t* handle_type, 245 virtual ResultCode AddKernelObjectToClose(const wchar_t* handle_type,
240 const wchar_t* handle_name) = 0; 246 const wchar_t* handle_name) = 0;
241 }; 247 };
242 248
243 } // namespace sandbox 249 } // namespace sandbox
244 250
245 251
246 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_H_ 252 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698