The following table describes the XML schema elements and
attributes. Unless otherwise indicated, the data type is
string.
Element |
Description, relationships, and attributes |
ace
|
Description:
Access control elements (ACEs) for the discretionary access control
list (DACL) or system access control list (SACL).
Parents:
dacl, sacl
Children:
inheritance (minOccurs="0" maxOccurs="*")
inheritedObjectTypeName (minOccurs="0" maxOccurs="1")
mode (minOccurs="1" maxOccurs="1")
objectTypeName (minOccurs="0" maxOccurs="1")
permission (minOccurs="1" maxOccurs="*")
trustee (minOccurs="1" maxOccurs="1")
trusteeForm (minOccurs="1" maxOccurs="1")
trusteeType (minOccurs="0" maxOccurs="1") |
dacl
|
Description:
DACL for the specified object.
Parent:
executeData
Child:
ace
|
executeData
|
Description:
Encapsulates the procedure's input data.
Children:
dacl (minOccurs="0" maxOccurs="1")
name (minOccurs="1" maxOccurs="1")
objectType (minOccurs="1" maxOccurs="1")
sacl (minOccurs="0" maxOccurs="1") |
inheritance
|
Description:
Set of bit flags that determines whether other containers or
objects can inherit the ACE from the primary object to which the
DACL or SACL is attached. This value can be either a number or an
AceFlags string. (See the AceFlags table following
the sample code.)
The value for this element corresponds to the inheritance
portion (low-order byte) of the AceFlags member of the
ACE_HEADER structure. This parameter can be NO_INHERITANCE to
indicate that the ACE is not inheritable, or it can be a
combination of the values from the AceFlags table following
the sample code. An ace parent can have multiple
inheritance elements whose values are concatenated by a
bitwise OR to build a single inheritance value.
The following example creates an ACE with an inheritance value
of 3.
<ace>
<inheritance>SUB_OBJECTS_ONLY_INHERIT</inheritance>
<inheritance>2</inheritance>
</ace>
AceFlags values:
0x0 |
NO_INHERITANCE |
Default. This ACE will not be inherited by other objects. |
0x1 |
SUB_OBJECTS_ONLY_INHERIT |
Non-container objects contained by the primary object inherit
the ACE. |
0x2 |
SUB_CONTAINERS_ONLY_INHERIT |
Other containers contained by the primary object inherit the
ACE. |
0x3 |
SUB_CONTAINERS_AND_OBJECTS_INHERIT |
Both containers and non-container objects contained by the
primary object inherit the ACE. |
0x4 |
INHERIT_NO_PROPAGATE |
The SUB_OBJECTS_ONLY_INHERIT and SUB_CONTAINERS_ONLY_INHERIT
flags are not propagated to an inherited ACE. |
0x8 |
INHERIT_ONLY |
The ACE does not apply to the primary object to which the DACL
or SACL is attached, but objects contained by the primary object
inherit the ACE. |
Parent:
ace
|
inheritedObjectTypeName
|
Description:
Identifies the type of objects that can inherit the ACE. If the
value for the trusteeForm node is
TRUSTEE_IS_OBJECTS_AND_NAME, inheritedObjectTypeName must be
a valid lightweight directory access protocol (LDAP) display name
in the Active Directory schema. For TRUSTEE_IS_OBJECTS_AND_SID,
this must be an LDAP path or a globally unique identifier (GUID) of
an extended right. If it begins with "LDAP://", the procedure gets
the object and stores the "rightsGUID" of the object. Otherwise,
the string must be a GUID string such as
"{12345678-1234-1234-1234-123456789abc}".
There is no default value. The procedure will fail if this
element exists and trusteeForm is not
TRUSTEE_IS_OBJECTS_AND_NAME or TRUSTEE_IS_OBJECTS_AND_SID.
Parent:
ace
|
mode
|
Description:
Specifies a value from the ACCESS_MODE enumeration. For a DACL,
mode indicates whether the DACL allows or denies the
specified access rights. For a SACL, mode indicates whether
the SACL generates audit messages for successful attempts to use
the specified access rights, or failed attempts, or both.
ACCESS_MODE values for a DACL:
1 |
GRANT_ACCESS |
The new ACE combines the specified rights with any existing
allowed or denied rights of the trustee. |
2 |
SET_ACCESS |
On input, this flag discards any matching access-control
information for the trustee and adds the new ACE. See REVOKE_ACCESS
for limitations on what is discarded. |
3 |
DENY_ACCESS |
On input, this flag denies the specified rights in addition to
any currently denied rights of the trustee. It also modifies or
deletes any existing access-control information for the trustee
that allows the specified rights. |
4 |
REVOKE_ACCESS |
An input flag that removes matching access-control information
for the trustee. When modifying an existing DACL, specify
REVOKE_ACCESS to remove any existing ACEs for the specified
trustee. However, note that the operating system typically converts
generic permissions to specific ones. Use to generate a list of all
specific permissions, then Update ACL to revoke individual
permissions. The ace element will be ignored if the ACE does
not exist or it is inherited from the parent. |
ACCESS_MODE values for a SACL:
4 |
REVOKE_ACCESS |
Input flag that removes matching access-control information for
the trustee. The ace element will be ignored if the ACE does
not exist or it is inherited from the parent. |
5 |
SET_AUDIT_SUCCESS |
Indicates a SYSTEM_AUDIT_ACE that generates audit messages for
successful attempts to use the specified access rights. You can
combine this value with SET_AUDIT_FAILURE. On input, this flag
combines the specified rights with any existing audited access
rights for the trustee. |
|
6 |
SET_AUDIT_FAILURE |
Indicates a SYSTEM_AUDIT_ACE that generates audit messages for
failed attempts to use the specified access rights. You can combine
this value with SET_AUDIT_SUCCESS. On input, this flag combines the
specified rights with any existing audited access rights for the
trustee. |
|
Parent:
ace
|
name
|
Description:
Name of the object to update the DACL or SACL for. For Active
Directory objects, this would be the LDAP path.
Parent:
executeData
|
objectType
|
Description:
One of the object types listed in the following SE_OBJECT_TYPE
table. For Active Directory objects, this should be
SE_DS_OBJECT.
0 |
SE_UNKNOWN_OBJECT_TYPE |
Unknown object type. |
1 |
SE_FILE_OBJECT |
A file or directory. The name string that identifies a file or
directory object can be one of the following.
- A relative path such as Abc.dat or
..\Abc.dat.
- An absolute path such as \Abc.dat,
C:\Dir1\Abc.dat, or G:\Remotedir\Abc.dat.
- A UNC name such as \\Machinename\Sharename\Abc.dat.
- A local file system root such as \\\\.\\C:. Security set
on a file system root does not persist when the system is
restarted.
|
|
2 |
SE_SERVICE |
A Win32 service. A service object can be a local service, such
as servicename; or a remote service, such as
\\machinename\servicename. |
3 |
SE_PRINTER |
A printer. A printer object can be a local printer, such as
printername; or a remote printer, such as
\\machinename\printername. |
4 |
SE_REGISTRY_KEY |
A registry key. A registry key object can be in the local
registry, such as CLASSES_ROOT\somepath; or in a
remote registry, such as
\\machinename\CLASSES_ROOT\somepath.
The names of registry keys must use the following literal
strings to identify the predefined registry keys:
CLASSES_ROOT, CURRENT_USER, MACHINE, and
USERS. |
|
5 |
SE_LMSHARE |
A network share. A share object can be local, such as
sharename; or remote, such as
\\machinename\sharename. |
6 |
SE_KERNEL_OBJECT |
A local kernel object. The GetSecurityInfo and
SetSecurityInfo functions support all types of kernel
objects. The GetNamedSecurityInfo and
SetNamedSecurityInfo functions work only with the following
kernel objects: semaphore, event, mutex, waitable timer, and file
mapping. |
|
7 |
SE_WINDOW_OBJECT |
A window station or desktop object on the local machine. You
cannot use GetNamedSecurityInfo and
SetNamedSecurityInfo with these objects because the names of
window stations or desktops are not unique. |
8 |
SE_DS_OBJECT |
Microsoft® Windows® 2000: A directory service (DS) object, or a
property set or property of a directory service object.
The name string for a DS object can be a UNC name such as
\\domain.microsoft.com\ou1\ou2\someobject.
The name string can also be in X.500 form, such as
CN=someobject,OU=ou2,OU=ou1,DC=domain,DC=microsoft,DC=com,O=internet. |
|
9 |
SE_DS_OBJECT_ALL |
Windows 2000: A directory service object and all of its
property sets and properties. |
10 |
SE_PROVIDER_DEFINED_OBJECT |
Windows 2000: A provider-defined object. |
11 |
SE_WMIGUID_OBJECT |
Windows 2000: A Windows Management Instrumentation (WMI)
object. |
Parent:
executeData
|
objectTypeName
|
Description:
String that identifies the type of object, property set, or
property protected by the ACE. If this ACE is inherited, it
identifies the type of object, property set, or property protected
by the inherited ACE. If the trusteeForm node is
TRUSTEE_IS_OBJECTS_AND_NAME, objectTypeName must be a valid
LDAP display name in the Active Directory schema. For
TRUSTEE_IS_OBJECTS_AND_SID, this must be an LDAP path or GUID of an
extended right. If it begins with "LDAP://", the procedure gets the
object and stores the "rightsGUID" of the object. Otherwise, the
string must be a GUID string such as
{12345678-1234-1234-1234-123456789abc}. The permission
element should be ADS_RIGHT_DS_CONTROL_ACCESS when setting an
extended right. There can be at most one of these elements. There
is no default value. The procedure will fail if this element exists
and trusteeForm is not TRUSTEE_IS_OBJECTS_AND_NAME or
TRUSTEE_IS_OBJECTS_AND_SID.
Parent:
ace
|
permission
|
Description:
Value containing standard, specific, and generic rights. These
rights are used in ACEs and are the primary means of specifying the
requested or granted access to an object. This value can be either
a number or string from any of the following tables. Multiple
permission elements can be concatenated by a bitwise OR to
create a single value.
Standard and generic permissions (ACCESS_MASK):
0x00010000L |
DELETE |
Delete access |
0x00020000L |
READ_CONTROL |
Read access to the owner, group, and discretionary access
control list (DACL) of the security descriptor |
0x00040000L |
WRITE_DAC |
Write access to the DACL |
0x00080000L |
WRITE_OWNER |
Write access to owner |
0x00100000L |
SYNCHRONIZE |
Microsoft® Windows NT® and Windows® 2000: Synchronize
access |
0x01000000L |
ACCESS_SYSTEM_SECURITY |
Access system security (ACCESS_SYSTEM_SECURITY). This flag is
not a typical access type. It is used to indicate access to a SACL
This type of access requires the calling process to
SE_SECURITY_NAME (Manage auditing and security log) privilege. If
this flag is set in the access mask of an audit access ACE
(successful or unsuccessful access), the SACL access will be
audited. |
0x02000000L |
MAXIMUM_ALLOWED |
Maximum allowed |
0x10000000L |
GENERIC_ALL |
Generic all |
0x20000000L |
GENERIC_EXECUTE |
Generic execute |
0x40000000L |
GENERIC_WRITE |
Generic write |
0x80000000L |
GENERIC_READ |
Generic read |
Active Directory permissions (ADS_RIGHTS_ENUM):
0x1 |
ADS_RIGHT_DS_CREATE_CHILD |
The right to create children of the object. The
ObjectType member of an ACE can contain a GUID that
identifies the type of child object whose creation is being
controlled. If ObjectType does not contain a GUID, the ACE
controls the creation of all child object types. |
0x2 |
ADS_RIGHT_DS_DELETE_CHILD |
The right to delete children of the object. The
ObjectType member of an ACE can contain a GUID that
identifies a type of child object whose deletion is being
controlled. If ObjectType does not contain a GUID, the ACE
controls the deletion of all child object types. |
0x4 |
ADS_RIGHT_ACTRL_DS_LIST |
The right to list children of this object. |
0x8 |
ADS_RIGHT_DS_SELF |
The right to modify the group membership of a group
object. |
0x10 |
ADS_RIGHT_DS_READ_PROP |
The right to read properties of the object. The
ObjectType member of an ACE can contain a GUID that
identifies a property set or property. If ObjectType does
not contain a GUID, the ACE controls the right to read all of the
object's properties. |
0x20 |
ADS_RIGHT_DS_WRITE_PROP |
The right to write properties of the object. The
ObjectType member of an ACE can contain a GUID that
identifies a property set or property. If ObjectType does
not contain a GUID, the ACE controls the right to write all of the
object's properties. |
0x40 |
ADS_RIGHT_DS_DELETE_TREE |
The right to delete all children of this object, regardless of
the permission on the children. |
0x80 |
ADS_RIGHT_DS_LIST_OBJECT |
The right to list an object. If the user is not granted such a
right, the object is hidden from the user. |
0x100 |
ADS_RIGHT_DS_CONTROL_ACCESS |
The right to perform an operation controlled by an extended
access right. The ObjectType member of an ACE can contain a
GUID that identifies the extended right. If ObjectType does
not contain a GUID, the ACE controls the right to perform all
extended right operations associated with the object. |
0x10000 |
ADS_RIGHT_DELETE |
The right to delete the object. |
0x20000 |
ADS_RIGHT_READ_CONTROL |
The right to read information from the security descriptor of
the object, not including the information in the SACL. |
0x40000 |
ADS_RIGHT_WRITE_DAC |
The right to modify the DACL in the object's security
descriptor. |
0x80000 |
ADS_RIGHT_WRITE_OWNER |
The right to assume ownership of the object. The user must be a
trustee of the object. The user cannot transfer the ownership to
other users. |
0x100000 |
ADS_RIGHT_SYNCHRONIZE |
The right to use the object for synchronization. This enables a
thread to wait until the object is in the signaled state. |
0x1000000 |
ADS_RIGHT_ACCESS_SYSTEM_SECURITY |
The right to get or set the SACL in the object's security
descriptor. |
0x10000000 |
ADS_RIGHT_GENERIC_ALL |
The right to create or delete children, delete a subtree, read
and write properties, examine children and the object itself, add
and remove the object from the directory, and read or write with an
extended right. |
0x20000000 |
ADS_RIGHT_GENERIC_EXECUTE |
The right to list children of this object. |
0x40000000 |
ADS_RIGHT_GENERIC_WRITE |
The right to write all the properties and write to the DACL.
The user can add and remove the object to and from the
directory. |
0x80000000 |
ADS_RIGHT_GENERIC_READ |
The right to read from the security descriptor, examine the
object as well as its children, and read all properties. |
Registry permissions:
0x0001 |
KEY_QUERY_VALUE |
Permission to query subkey data. |
0x0002 |
KEY_SET_VALUE |
Permission to set subkey data. |
0x0004 |
KEY_CREATE_SUB_KEY |
Permission to create subkeys. |
0x0008 |
KEY_ENUMERATE_SUB_KEYS |
Permission to enumerate subkeys. |
0x0010 |
KEY_NOTIFY |
Permission for change notification. |
0x0020 |
KEY_CREATE_LINK |
Permission to create a symbolic link. |
0x20006 |
KEY_WRITE |
Combines the READ_CONTROL, KEY_SET_VALUE, and
KEY_CREATE_SUB_KEY access rights. |
0x20019 |
KEY_EXECUTE |
Permission for read access. |
0x20019 |
KEY_READ |
Combines the READ_CONTROL, KEY_QUERY_VALUE,
KEY_ENUMERATE_SUB_KEYS, and KEY_NOTIFY access rights. |
0xF003F |
KEY_ALL_ACCESS |
Combines the KEY_QUERY_VALUE, KEY_ENUMERATE_SUB_KEYS,
KEY_NOTIFY, KEY_CREATE_SUB_KEY, KEY_CREATE_LINK, and KEY_SET_VALUE
access rights, plus all the standard access rights except
SYNCHRONIZE. |
File system permissions:
0x0001 |
FILE_LIST_DIRECTORY, FILE_READ_DATA |
Right to read data from a file. For a directory, the right to
list the contents of a directory. |
0x0002 |
FILE_WRITE_DATA |
Right to write data to a file. For a directory, the right to
create a file in a directory. |
0x0004 |
FILE_ADD_SUBDIRECTORY, FILE_APPEND_DATA |
Right to append data to the file. For a directory, the right to
create a subdirectory. |
0x0008 |
FILE_READ_EA |
Right to read extended attributes. |
0x0010 |
FILE_WRITE_EA |
Right to write extended attributes. |
0x0020 |
FILE_EXECUTE |
Right to execute a program. |
0x0020 |
FILE_TRAVERSE |
Right to execute a file. For a directory, the directory can be
traversed. |
0x0040 |
FILE_DELETE_CHILD |
For a directory, the right to delete a subdirectory. |
0x0080 |
FILE_READ_ATTRIBUTES |
Right to read file attributes. |
0x0100 |
FILE_WRITE_ATTRIBUTES |
Right to write file attributes. |
0x120089 |
FILE_GENERIC_READ |
Combination of permissions. |
0x1200A0 |
FILE_GENERIC_EXECUTE |
Combination of permissions. |
0x120116 |
FILE_GENERIC_WRITE |
Combination of permissions. |
Parent:
ace
|
sacl
|
Description:
SACL for the specified object.
Parent:
executeData
Child:
ace
|
trustee
|
Description:
Identifies the user, group, or program (such as a Win32 service) to
which the ACE applies. Can be either a sAMAccountName, LDAP
path or security identifier (SID), depending on the value for the
trusteeForm node. For TRUSTEE_IS_NAME or
TRUSTEE_IS_OBJECTS_AND_NAME, trustee should be a valid
sAMAccountName. For TRUSTEE_IS_SID or
TRUSTEE_IS_OBJECTS_AND_SID, trustee must be a SID or LDAP
path. If trustee begins with "LDAP://", the procedure
assumes it is an LDAP path; otherwise, the procedure assumes
trustee is a SID in string format. For LDAP path, the
procedure gets the objectSid of the object and stores the
SID.
Parent:
ace
Note: sAMAccountName cannot be longer than 20
characters. See SAM-Account-Name
Attribute for more information. |
trusteeForm
|
Description:
Specifies a value from the TRUSTEE_FORM enumeration type that
indicates the type of value in the trustee node. This value
can be either a TRUSTEE_FORM string or a number. If an
objectTypeName or inheritedObjectTypeName is
supplied, it should be either TRUSTEE_IS_OBJECTS_AND_NAME or
TRUSTEE_IS_OBJECTS_AND_SID.
0 |
TRUSTEE_IS_SID |
trustee is the SID of the trustee. |
1 |
TRUSTEE_IS_NAME |
trustee is the name of the trustee. |
3 |
TRUSTEE_IS_OBJECTS_AND_SID |
trustee is the SID of the trustee and either
objectTypeName or inheritedObjectTypeName is
supplied. |
4 |
TRUSTEE_IS_OBJECTS_AND_NAME |
trustee is the name of the trustee and either
objectTypeName or inheritedObjectTypeName is
supplied. |
Parent:
ace
|
trusteeType
|
Description:
Indicates whether the trustee is a user account, a group account,
or the account type is unknown. Specifies a value from the
following TRUSTEE_TYPE enumeration. The default is
TRUSTEE_IS_UNKNOWN.
0 |
TRUSTEE_IS_UNKNOWN |
Trustee type is unknown, but not necessarily invalid. |
1 |
TRUSTEE_IS_USER |
Indicates a user. |
2 |
TRUSTEE_IS_GROUP |
Indicates a group. |
3 |
TRUSTEE_IS_DOMAIN |
Indicates an Active Directory domain. |
4 |
TRUSTEE_IS_ALIAS |
Indicates an alias. |
5 |
TRUSTEE_IS_WELL_KNOWN_GROUP |
Indicates a well-known group. |
6 |
TRUSTEE_IS_DELETED |
Indicates a deleted account. |
7 |
TRUSTEE_IS_INVALID |
Indicates an invalid trustee type. |
8 |
TRUSTEE_IS_COMPUTER |
Indicates a computer. |
Parent:
ace
|
|