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

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

Issue 1821193002: Added a policy option to restrict the default DACL for tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added access mask to open process test Created 4 years, 8 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/sandbox_win.gypi ('k') | sandbox/win/src/acl.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 #ifndef SANDBOX_SRC_ACL_H_ 5 #ifndef SANDBOX_SRC_ACL_H_
6 #define SANDBOX_SRC_ACL_H_ 6 #define SANDBOX_SRC_ACL_H_
7 7
8 #include <AccCtrl.h> 8 #include <AccCtrl.h>
9 #include <windows.h> 9 #include <windows.h>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "sandbox/win/src/sid.h" 12 #include "sandbox/win/src/sid.h"
13 13
14 namespace sandbox { 14 namespace sandbox {
15 15
16 // Returns the default dacl from the token passed in. 16 // Returns the default dacl from the token passed in.
17 bool GetDefaultDacl( 17 bool GetDefaultDacl(
18 HANDLE token, 18 HANDLE token,
19 scoped_ptr<TOKEN_DEFAULT_DACL, base::FreeDeleter>* default_dacl); 19 scoped_ptr<TOKEN_DEFAULT_DACL, base::FreeDeleter>* default_dacl);
20 20
21 // Appends an ACE represented by |sid|, |access_mode|, and |access| to 21 // Appends an ACE represented by |sid|, |access_mode|, and |access| to
22 // |old_dacl|. If the function succeeds, new_dacl contains the new dacl and 22 // |old_dacl|. If the function succeeds, new_dacl contains the new dacl and
23 // must be freed using LocalFree. 23 // must be freed using LocalFree.
24 bool AddSidToDacl(const Sid& sid, ACL* old_dacl, ACCESS_MODE access_mode, 24 bool AddSidToDacl(const Sid& sid, ACL* old_dacl, ACCESS_MODE access_mode,
25 ACCESS_MASK access, ACL** new_dacl); 25 ACCESS_MASK access, ACL** new_dacl);
26 26
27 // Adds and ACE represented by |sid| and |access| to the default dacl present 27 // Adds an ACE represented by |sid| and |access| with |access_mode| to the
28 // in the token. 28 // default dacl present in the token.
29 bool AddSidToDefaultDacl(HANDLE token, const Sid& sid, ACCESS_MASK access); 29 bool AddSidToDefaultDacl(HANDLE token,
30 const Sid& sid,
31 ACCESS_MODE access_mode,
32 ACCESS_MASK access);
33
34 // Revokes access to the logon SID for the default dacl present in the token.
35 bool RevokeLogonSidFromDefaultDacl(HANDLE token);
30 36
31 // Adds an ACE represented by the user sid and |access| to the default dacl 37 // Adds an ACE represented by the user sid and |access| to the default dacl
32 // present in the token. 38 // present in the token.
33 bool AddUserSidToDefaultDacl(HANDLE token, ACCESS_MASK access); 39 bool AddUserSidToDefaultDacl(HANDLE token, ACCESS_MASK access);
34 40
35 // Adds an ACE represented by |known_sid|, |access_mode|, and |access| to 41 // Adds an ACE represented by |known_sid|, |access_mode|, and |access| to
36 // the dacl of the kernel object referenced by |object| and of |object_type|. 42 // the dacl of the kernel object referenced by |object| and of |object_type|.
37 bool AddKnownSidToObject(HANDLE object, SE_OBJECT_TYPE object_type, 43 bool AddKnownSidToObject(HANDLE object, SE_OBJECT_TYPE object_type,
38 const Sid& sid, ACCESS_MODE access_mode, 44 const Sid& sid, ACCESS_MODE access_mode,
39 ACCESS_MASK access); 45 ACCESS_MASK access);
40 46
41 } // namespace sandbox 47 } // namespace sandbox
42 48
43 49
44 #endif // SANDBOX_SRC_ACL_H_ 50 #endif // SANDBOX_SRC_ACL_H_
OLDNEW
« no previous file with comments | « sandbox/win/sandbox_win.gypi ('k') | sandbox/win/src/acl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698