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.

     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
     3 // found in the LICENSE file.
     5 #ifndef SANDBOX_SRC_ACL_H_
     6 #define SANDBOX_SRC_ACL_H_
     8 #include <windows.h>
    10 #include "base/memory/scoped_ptr.h"
    11 #include "sandbox/win/src/sid.h"
    13 namespace sandbox {
    15 // Returns the default dacl from the token passed in.
    16 bool GetDefaultDacl(HANDLE token,
    17                     scoped_ptr_malloc<TOKEN_DEFAULT_DACL>* default_dacl);
    19 // 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 // LocalFree.
    22 bool AddSidToDacl(const Sid& sid, ACL* old_dacl, ACCESS_MASK access,
    23                   ACL** new_dacl);
    25 // Adds and ACE represented by |sid| and |access| to the default dacl present
    26 // in the token.
    27 bool AddSidToDefaultDacl(HANDLE token, const Sid& sid, ACCESS_MASK access);
    29 // Adds an ACE represented by the user sid and |access| to the default dacl
    30 // present in the token.
    31 bool AddUserSidToDefaultDacl(HANDLE token, ACCESS_MASK access);
    33 // Adds an ACE represented by |known_sid| and |access| to the dacl of the kernel
    34 // object referenced by |object|.
    35 bool AddKnownSidToKernelObject(HANDLE object, const Sid& sid,
    36                                ACCESS_MASK access);
    38 }  // namespace sandbox
    41 #endif  // SANDBOX_SRC_ACL_H_

mercurial