OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_SRC_RESTRICTED_TOKEN_H_ | 5 #ifndef SANDBOX_SRC_RESTRICTED_TOKEN_H_ |
6 #define SANDBOX_SRC_RESTRICTED_TOKEN_H_ | 6 #define SANDBOX_SRC_RESTRICTED_TOKEN_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 unsigned SetIntegrityLevel(IntegrityLevel integrity_level); | 170 unsigned SetIntegrityLevel(IntegrityLevel integrity_level); |
171 | 171 |
172 private: | 172 private: |
173 // The list of restricting sids in the restricted token. | 173 // The list of restricting sids in the restricted token. |
174 std::vector<Sid> sids_to_restrict_; | 174 std::vector<Sid> sids_to_restrict_; |
175 // The list of privileges to remove in the restricted token. | 175 // The list of privileges to remove in the restricted token. |
176 std::vector<LUID> privileges_to_disable_; | 176 std::vector<LUID> privileges_to_disable_; |
177 // The list of sids to mark as Deny Only in the restricted token. | 177 // The list of sids to mark as Deny Only in the restricted token. |
178 std::vector<Sid> sids_for_deny_only_; | 178 std::vector<Sid> sids_for_deny_only_; |
179 // The token to restrict. Can only be set in a constructor. | 179 // The token to restrict. Can only be set in a constructor. |
180 HANDLE effective_token_; | 180 base::win::ScopedHandle effective_token_; |
181 // The token integrity level. Only valid on Vista. | 181 // The token integrity level. Only valid on Vista. |
182 IntegrityLevel integrity_level_; | 182 IntegrityLevel integrity_level_; |
183 // Tells if the object is initialized or not (if Init() has been called) | 183 // Tells if the object is initialized or not (if Init() has been called) |
184 bool init_; | 184 bool init_; |
185 | 185 |
186 DISALLOW_COPY_AND_ASSIGN(RestrictedToken); | 186 DISALLOW_COPY_AND_ASSIGN(RestrictedToken); |
187 }; | 187 }; |
188 | 188 |
189 } // namespace sandbox | 189 } // namespace sandbox |
190 | 190 |
191 #endif // SANDBOX_SRC_RESTRICTED_TOKEN_H_ | 191 #endif // SANDBOX_SRC_RESTRICTED_TOKEN_H_ |
OLD | NEW |