security/sandbox/win/src/acl.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
michael@0 2 // Use of this source code is governed by a BSD-style license that can be
michael@0 3 // found in the LICENSE file.
michael@0 4
michael@0 5 #ifndef SANDBOX_SRC_ACL_H_
michael@0 6 #define SANDBOX_SRC_ACL_H_
michael@0 7
michael@0 8 #include <windows.h>
michael@0 9
michael@0 10 #include "base/memory/scoped_ptr.h"
michael@0 11 #include "sandbox/win/src/sid.h"
michael@0 12
michael@0 13 namespace sandbox {
michael@0 14
michael@0 15 // Returns the default dacl from the token passed in.
michael@0 16 bool GetDefaultDacl(HANDLE token,
michael@0 17 scoped_ptr_malloc<TOKEN_DEFAULT_DACL>* default_dacl);
michael@0 18
michael@0 19 // Appends an ACE represented by |sid| and |access| to |old_dacl|. If the
michael@0 20 // function succeeds, new_dacl contains the new dacl and must be freed using
michael@0 21 // LocalFree.
michael@0 22 bool AddSidToDacl(const Sid& sid, ACL* old_dacl, ACCESS_MASK access,
michael@0 23 ACL** new_dacl);
michael@0 24
michael@0 25 // Adds and ACE represented by |sid| and |access| to the default dacl present
michael@0 26 // in the token.
michael@0 27 bool AddSidToDefaultDacl(HANDLE token, const Sid& sid, ACCESS_MASK access);
michael@0 28
michael@0 29 // Adds an ACE represented by the user sid and |access| to the default dacl
michael@0 30 // present in the token.
michael@0 31 bool AddUserSidToDefaultDacl(HANDLE token, ACCESS_MASK access);
michael@0 32
michael@0 33 // Adds an ACE represented by |known_sid| and |access| to the dacl of the kernel
michael@0 34 // object referenced by |object|.
michael@0 35 bool AddKnownSidToKernelObject(HANDLE object, const Sid& sid,
michael@0 36 ACCESS_MASK access);
michael@0 37
michael@0 38 } // namespace sandbox
michael@0 39
michael@0 40
michael@0 41 #endif // SANDBOX_SRC_ACL_H_

mercurial