Platform SDK: Access Control |
The GetEffectiveRightsFromAcl function retrieves the effective access rights that an ACL grants to a specified trustee. The trustee's effective access rights are the access rights that the ACL grants to the trustee or to any groups of which the trustee is a member.
Windows NT: This function does not currently return group rights. This will be fixed in a later Windows NT Service Pack release.
DWORD GetEffectiveRightsFromAcl( PACL pacl, // source ACL PTRUSTEE pTrustee, // trustee PACCESS_MASK pAccessRights // trustee's access rights );
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a nonzero error code defined in Winerror.h.
GetEffectiveRightsFromAcl checks all access-allowed and access-denied ACEs in the ACL to determine the effective rights for the trustee. For all ACEs that allow or deny rights to a group, GetEffectiveRightsFromAcl enumerates the members of the group to determine whether the trustee is a member. The function returns an error if it cannot enumerate the members of a group.
A trustee's group rights are enumerated by GetEffectiveRightsFromAcl on the local machine, even if the trustee is accessing objects on a remote machine. This function does not evaluate group rights on remote machines.
GetEffectiveRightsFromAcl does not take into account implicitly granted access rights, namely READ_CONTROL and WRITE_DAC, for the owner of an object when determining effective rights.
GetEffectiveRightsFromAcl does not take privileges held by the trustee into account when determining effective access rights.
GetEffectiveRightsFromAcl does not take into account group rights associated with the logon session, such as interactive, network, authenticated users, etc., in determining effective access rights.
GetEffectiveRightsFromAcl does not take into account resource manager policy when determining effective access rights. For example, for file objects, Delete and Read attributes can be provided by the parent even if they have been denied on the object.
Windows NT/2000: Requires Windows NT 4.0 or later.
Header: Declared in Aclapi.h.
Library: Use Advapi32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.
Access Control Overview, Access Control Functions, ACCESS_ALLOWED_ACE, ACCESS_DENIED_ACE, ACCESS_MASK, ACE, ACL, GetAuditedPermissionsFromAcl, SID, TRUSTEE