GetInheritanceSourceA function

The GetInheritanceSource function returns information about the source of inherited access control entries (ACEs) in an access control list (ACL).

Syntax

DWORD GetInheritanceSourceA(
  LPSTR                 pObjectName,
  SE_OBJECT_TYPE        ObjectType,
  SECURITY_INFORMATION  SecurityInfo,
  BOOL                  Container,
  GUID                  **pObjectClassGuids,
  DWORD                 GuidCount,
  PACL                  pAcl,
  PFN_OBJECT_MGR_FUNCTS pfnArray,
  PGENERIC_MAPPING      pGenericMapping,
  PINHERITED_FROMA      pInheritArray
);

Parameters

pObjectName

A pointer to the name of the object that uses the ACL to be checked.

ObjectType

The type of object indicated by pObjectName. The possible values are SE_FILE_OBJECT, SE_REGISTRY_KEY, SE_DS_OBJECT, and SE_DS_OBJECT_ALL.

SecurityInfo

The type of ACL used with the object. The possible values are DACL_SECURITY_INFORMATION or SACL_SECURITY_INFORMATION.

Container

TRUE if the object is a container object or FALSE if the object is a leaf object. Note that the only leaf object is SE_FILE_OBJECT.

pObjectClassGuids

Optional list of GUIDs that identify the object types or names associated with pObjectName. This may be NULL if the object manager only supports one object class or has no GUID associated with the object class.

GuidCount

Number of GUIDs pointed to by pObjectClassGuids.

pAcl

The ACL for the object.

pfnArray

Reserved. Set this parameter to NULL.

pGenericMapping

The mapping of generic rights to specific rights for the object.

pInheritArray

A pointer to an array of INHERITED_FROM structures that the GetInheritanceSource function fills with the inheritance information. The caller must allocate enough memory for an entry for each ACE in the ACL.

Return Value

If the function succeeds, the function returns ERROR_SUCCESS.

If the function fails, it returns a nonzero error code defined in WinError.h.

Remarks

The GetInheritanceSource function allocates memory for the names returned in the INHERITED_FROM structure. When the function has finished using this memory, the calling program must free it by calling FreeInheritedFromArray. Note that the caller must provide memory for the array itself. If the caller allocated the memory, the caller must free that memory after calling FreeInheritedFromArray.

This function does not handle race conditions. If your thread calls this function at the approximate time that another thread changes the object's security descriptor, then this function could fail.

Requirements

   
Windows version Windows XP [desktop apps only] Windows Server 2003 [desktop apps only]
Target Platform Windows
Header aclapi.h
Library Advapi32.lib
DLL Advapi32.dll

See Also

FreeInheritedFromArray