diff options
author | jln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-18 00:59:15 +0000 |
---|---|---|
committer | jln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-18 00:59:15 +0000 |
commit | 18149178646e45f3d7dde865efbeabbab431799a (patch) | |
tree | cc19ce0fc5cc1927695c789212fab93a195b9d9f /sandbox/win/src/acl.h | |
parent | 4633cdb53427b31197d3c6f991f07bee2a04e0df (diff) | |
download | chromium_src-18149178646e45f3d7dde865efbeabbab431799a.zip chromium_src-18149178646e45f3d7dde865efbeabbab431799a.tar.gz chromium_src-18149178646e45f3d7dde865efbeabbab431799a.tar.bz2 |
Move the Windows sandbox to sandbox/win
This is a rather large refactor to move the Windows sandbox to the right place.
BUG=
TEST=
NOTRY=true
TBR=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10689170
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147151 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/win/src/acl.h')
-rw-r--r-- | sandbox/win/src/acl.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/sandbox/win/src/acl.h b/sandbox/win/src/acl.h new file mode 100644 index 0000000..25d5cdb --- /dev/null +++ b/sandbox/win/src/acl.h @@ -0,0 +1,41 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef SANDBOX_SRC_ACL_H_ +#define SANDBOX_SRC_ACL_H_ + +#include <windows.h> + +#include "base/memory/scoped_ptr.h" +#include "sandbox/win/src/sid.h" + +namespace sandbox { + +// Returns the default dacl from the token passed in. +bool GetDefaultDacl(HANDLE token, + scoped_ptr_malloc<TOKEN_DEFAULT_DACL>* default_dacl); + +// Appends an ACE represented by |sid| and |access| to |old_dacl|. If the +// function succeeds, new_dacl contains the new dacl and must be freed using +// LocalFree. +bool AddSidToDacl(const Sid& sid, ACL* old_dacl, ACCESS_MASK access, + ACL** new_dacl); + +// Adds and ACE represented by |sid| and |access| to the default dacl present +// in the token. +bool AddSidToDefaultDacl(HANDLE token, const Sid& sid, ACCESS_MASK access); + +// Adds an ACE represented by the user sid and |access| to the default dacl +// present in the token. +bool AddUserSidToDefaultDacl(HANDLE token, ACCESS_MASK access); + +// Adds an ACE represented by |known_sid| and |access| to the dacl of the kernel +// object referenced by |object|. +bool AddKnownSidToKernelObject(HANDLE object, const Sid& sid, + ACCESS_MASK access); + +} // namespace sandbox + + +#endif // SANDBOX_SRC_ACL_H_ |