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

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

Issue 169193002: Convert scoped_ptr_malloc -> scoped_ptr, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 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 | Annotate | Revision Log
« no previous file with comments | « sandbox/win/src/Wow64.cc ('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 <windows.h> 8 #include <windows.h>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "sandbox/win/src/sid.h" 11 #include "sandbox/win/src/sid.h"
12 12
13 namespace sandbox { 13 namespace sandbox {
14 14
15 // Returns the default dacl from the token passed in. 15 // Returns the default dacl from the token passed in.
16 bool GetDefaultDacl(HANDLE token, 16 bool GetDefaultDacl(
17 scoped_ptr_malloc<TOKEN_DEFAULT_DACL>* default_dacl); 17 HANDLE token,
18 scoped_ptr<TOKEN_DEFAULT_DACL, base::FreeDeleter>* default_dacl);
18 19
19 // Appends an ACE represented by |sid| and |access| to |old_dacl|. If the 20 // Appends an ACE represented by |sid| and |access| to |old_dacl|. If the
20 // function succeeds, new_dacl contains the new dacl and must be freed using 21 // function succeeds, new_dacl contains the new dacl and must be freed using
21 // LocalFree. 22 // LocalFree.
22 bool AddSidToDacl(const Sid& sid, ACL* old_dacl, ACCESS_MASK access, 23 bool AddSidToDacl(const Sid& sid, ACL* old_dacl, ACCESS_MASK access,
23 ACL** new_dacl); 24 ACL** new_dacl);
24 25
25 // Adds and ACE represented by |sid| and |access| to the default dacl present 26 // Adds and ACE represented by |sid| and |access| to the default dacl present
26 // in the token. 27 // in the token.
27 bool AddSidToDefaultDacl(HANDLE token, const Sid& sid, ACCESS_MASK access); 28 bool AddSidToDefaultDacl(HANDLE token, const Sid& sid, ACCESS_MASK access);
28 29
29 // Adds an ACE represented by the user sid and |access| to the default dacl 30 // Adds an ACE represented by the user sid and |access| to the default dacl
30 // present in the token. 31 // present in the token.
31 bool AddUserSidToDefaultDacl(HANDLE token, ACCESS_MASK access); 32 bool AddUserSidToDefaultDacl(HANDLE token, ACCESS_MASK access);
32 33
33 // Adds an ACE represented by |known_sid| and |access| to the dacl of the kernel 34 // Adds an ACE represented by |known_sid| and |access| to the dacl of the kernel
34 // object referenced by |object|. 35 // object referenced by |object|.
35 bool AddKnownSidToKernelObject(HANDLE object, const Sid& sid, 36 bool AddKnownSidToKernelObject(HANDLE object, const Sid& sid,
36 ACCESS_MASK access); 37 ACCESS_MASK access);
37 38
38 } // namespace sandbox 39 } // namespace sandbox
39 40
40 41
41 #endif // SANDBOX_SRC_ACL_H_ 42 #endif // SANDBOX_SRC_ACL_H_
OLDNEW
« no previous file with comments | « sandbox/win/src/Wow64.cc ('k') | sandbox/win/src/acl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698