AddAccessAllowedAce

  BOOL AddAccessAllowedAce(Acl, AceRevision, AccessMask, Sid)    
  PACL Acl;    
  DWORD AceRevision;    
  DWORD AccessMask;    
  PSID Sid;    

The AddAccessAllowedAce function adds an ACCESS_ALLOWED ACE to an ACL. The access is granted to a specified SID. An ACE is an access control entry. An ACL is an access control list. An SID is a security identifier.

The AddAccessAllowedAce function places a very bland ACE header in the ACE. It provides no inheritance and no ACE flags.

This is expected to be the most common form of ACL modification.

Parameters

Acl

Pointer to an existing ACL data structure. The function will add an ACCESS_ALLOWED ACE to this ACL.

The ACL data structure has the following form:

typedef struct _ACL { /* acl */

BYTE AclRevision;

BYTE Sbz1;

WORD AclSize;

WORD AceCount;

WORD Sbz2;

} ACL;

AceRevision

Specifies the ACL/ACE revision level of the ACE being added.

AccessMask

Specifies the mask of accesses to be granted to the specified SID.

Sid

Pointer to the SID being granted access.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.

See Also

AddAce, DeleteAce, GetAce, GetAclInformation, InitializeAcl, IsValidAcl, SetAclInformation