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

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

Issue 1923653002: Wire up process launch error codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix debug and clang Created 4 years, 7 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/broker_services.cc ('k') | sandbox/win/src/sandbox_policy_base.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BASE_H_ 5 #ifndef SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_
6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ 6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // SetTokenLevel(). Also creates a lowbox token if specified based on the 81 // SetTokenLevel(). Also creates a lowbox token if specified based on the
82 // lowbox SID. 82 // lowbox SID.
83 ResultCode MakeTokens(base::win::ScopedHandle* initial, 83 ResultCode MakeTokens(base::win::ScopedHandle* initial,
84 base::win::ScopedHandle* lockdown, 84 base::win::ScopedHandle* lockdown,
85 base::win::ScopedHandle* lowbox); 85 base::win::ScopedHandle* lowbox);
86 86
87 PSID GetLowBoxSid() const; 87 PSID GetLowBoxSid() const;
88 88
89 // Adds a target process to the internal list of targets. Internally a 89 // Adds a target process to the internal list of targets. Internally a
90 // call to TargetProcess::Init() is issued. 90 // call to TargetProcess::Init() is issued.
91 bool AddTarget(TargetProcess* target); 91 ResultCode AddTarget(TargetProcess* target);
92 92
93 // Called when there are no more active processes in a Job. 93 // Called when there are no more active processes in a Job.
94 // Removes a Job object associated with this policy and the target associated 94 // Removes a Job object associated with this policy and the target associated
95 // with the job. 95 // with the job.
96 bool OnJobEmpty(HANDLE job); 96 bool OnJobEmpty(HANDLE job);
97 97
98 EvalResult EvalPolicy(int service, CountedParameterSetBase* params); 98 EvalResult EvalPolicy(int service, CountedParameterSetBase* params);
99 99
100 HANDLE GetStdoutHandle(); 100 HANDLE GetStdoutHandle();
101 HANDLE GetStderrHandle(); 101 HANDLE GetStderrHandle();
102 102
103 // Returns the list of handles being shared with the target process. 103 // Returns the list of handles being shared with the target process.
104 const base::HandlesToInheritVector& GetHandlesBeingShared(); 104 const base::HandlesToInheritVector& GetHandlesBeingShared();
105 105
106 private: 106 private:
107 ~PolicyBase(); 107 ~PolicyBase();
108 108
109 // Sets up interceptions for a new target. 109 // Sets up interceptions for a new target.
110 bool SetupAllInterceptions(TargetProcess* target); 110 ResultCode SetupAllInterceptions(TargetProcess* target);
111 111
112 // Sets up the handle closer for a new target. 112 // Sets up the handle closer for a new target.
113 bool SetupHandleCloser(TargetProcess* target); 113 bool SetupHandleCloser(TargetProcess* target);
114 114
115 ResultCode AddRuleInternal(SubSystem subsystem, 115 ResultCode AddRuleInternal(SubSystem subsystem,
116 Semantics semantics, 116 Semantics semantics,
117 const wchar_t* pattern); 117 const wchar_t* pattern);
118 118
119 // This lock synchronizes operations on the targets_ collection. 119 // This lock synchronizes operations on the targets_ collection.
120 CRITICAL_SECTION lock_; 120 CRITICAL_SECTION lock_;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // shared with the target at times. 167 // shared with the target at times.
168 base::HandlesToInheritVector handles_to_share_; 168 base::HandlesToInheritVector handles_to_share_;
169 bool enable_opm_redirection_; 169 bool enable_opm_redirection_;
170 170
171 DISALLOW_COPY_AND_ASSIGN(PolicyBase); 171 DISALLOW_COPY_AND_ASSIGN(PolicyBase);
172 }; 172 };
173 173
174 } // namespace sandbox 174 } // namespace sandbox
175 175
176 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ 176 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_
OLDNEW
« no previous file with comments | « sandbox/win/src/broker_services.cc ('k') | sandbox/win/src/sandbox_policy_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698