source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/aclapi.h

Last change on this file was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 10.5 KB
Line 
1/**
2 * This file is part of the mingw-w64 runtime package.
3 * No warranty is given; refer to the file DISCLAIMER within this package.
4 */
5#ifndef __ACCESS_CONTROL_API__
6#define __ACCESS_CONTROL_API__
7
8#include <winapifamily.h>
9
10#include <_mingw_unicode.h>
11#include <windows.h>
12#include <accctrl.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
19
20 typedef VOID (*FN_PROGRESS) (LPWSTR pObjectName, DWORD Status, PPROG_INVOKE_SETTING pInvokeSetting, PVOID Args, WINBOOL SecuritySet);
21
22#define GetEffectiveRightsFromAcl __MINGW_NAME_AW(GetEffectiveRightsFromAcl)
23#define GetAuditedPermissionsFromAcl __MINGW_NAME_AW(GetAuditedPermissionsFromAcl)
24#define GetInheritanceSource __MINGW_NAME_AW(GetInheritanceSource)
25#define TreeResetNamedSecurityInfo __MINGW_NAME_AW(TreeResetNamedSecurityInfo)
26#define BuildSecurityDescriptor __MINGW_NAME_AW(BuildSecurityDescriptor)
27#define LookupSecurityDescriptorParts __MINGW_NAME_AW(LookupSecurityDescriptorParts)
28#define BuildExplicitAccessWithName __MINGW_NAME_AW(BuildExplicitAccessWithName)
29#define BuildImpersonateExplicitAccessWithName __MINGW_NAME_AW(BuildImpersonateExplicitAccessWithName)
30#define BuildTrusteeWithName __MINGW_NAME_AW(BuildTrusteeWithName)
31#define BuildImpersonateTrustee __MINGW_NAME_AW(BuildImpersonateTrustee)
32#define BuildTrusteeWithSid __MINGW_NAME_AW(BuildTrusteeWithSid)
33#define BuildTrusteeWithObjectsAndSid __MINGW_NAME_AW(BuildTrusteeWithObjectsAndSid)
34#define BuildTrusteeWithObjectsAndName __MINGW_NAME_AW(BuildTrusteeWithObjectsAndName)
35#define GetTrusteeName __MINGW_NAME_AW(GetTrusteeName)
36#define GetTrusteeType __MINGW_NAME_AW(GetTrusteeType)
37#define GetTrusteeForm __MINGW_NAME_AW(GetTrusteeForm)
38#define GetMultipleTrusteeOperation __MINGW_NAME_AW(GetMultipleTrusteeOperation)
39#define GetMultipleTrustee __MINGW_NAME_AW(GetMultipleTrustee)
40#if NTDDI_VERSION >= 0x06000000
41#define TreeSetNamedSecurityInfo __MINGW_NAME_AW(TreeSetNamedSecurityInfo)
42#endif
43
44#define AccProvInit(err)
45
46 WINADVAPI DWORD WINAPI GetEffectiveRightsFromAclA (PACL pacl, PTRUSTEE_A pTrustee, PACCESS_MASK pAccessRights);
47 WINADVAPI DWORD WINAPI GetEffectiveRightsFromAclW (PACL pacl, PTRUSTEE_W pTrustee, PACCESS_MASK pAccessRights);
48 WINADVAPI DWORD WINAPI GetAuditedPermissionsFromAclA (PACL pacl, PTRUSTEE_A pTrustee, PACCESS_MASK pSuccessfulAuditedRights, PACCESS_MASK pFailedAuditRights);
49 WINADVAPI DWORD WINAPI GetAuditedPermissionsFromAclW (PACL pacl, PTRUSTEE_W pTrustee, PACCESS_MASK pSuccessfulAuditedRights, PACCESS_MASK pFailedAuditRights);
50 WINADVAPI DWORD WINAPI GetInheritanceSourceA (LPSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, WINBOOL Container, GUID **pObjectClassGuids, DWORD GuidCount, PACL pAcl, PFN_OBJECT_MGR_FUNCTS pfnArray, PGENERIC_MAPPING pGenericMapping, PINHERITED_FROMA pInheritArray);
51 WINADVAPI DWORD WINAPI GetInheritanceSourceW (LPWSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, WINBOOL Container, GUID **pObjectClassGuids, DWORD GuidCount, PACL pAcl, PFN_OBJECT_MGR_FUNCTS pfnArray, PGENERIC_MAPPING pGenericMapping, PINHERITED_FROMW pInheritArray);
52 WINADVAPI DWORD WINAPI FreeInheritedFromArray (PINHERITED_FROMW pInheritArray, USHORT AceCnt, PFN_OBJECT_MGR_FUNCTS pfnArray);
53 WINADVAPI DWORD WINAPI TreeResetNamedSecurityInfoA (LPSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID pOwner, PSID pGroup, PACL pDacl, PACL pSacl, WINBOOL KeepExplicit, FN_PROGRESS fnProgress, PROG_INVOKE_SETTING ProgressInvokeSetting, PVOID Args);
54 WINADVAPI DWORD WINAPI TreeResetNamedSecurityInfoW (LPWSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID pOwner, PSID pGroup, PACL pDacl, PACL pSacl, WINBOOL KeepExplicit, FN_PROGRESS fnProgress, PROG_INVOKE_SETTING ProgressInvokeSetting, PVOID Args);
55 WINADVAPI DWORD WINAPI BuildSecurityDescriptorA (PTRUSTEE_A pOwner, PTRUSTEE_A pGroup, ULONG cCountOfAccessEntries, PEXPLICIT_ACCESS_A pListOfAccessEntries, ULONG cCountOfAuditEntries, PEXPLICIT_ACCESS_A pListOfAuditEntries, PSECURITY_DESCRIPTOR pOldSD, PULONG pSizeNewSD, PSECURITY_DESCRIPTOR *pNewSD);
56 WINADVAPI DWORD WINAPI BuildSecurityDescriptorW (PTRUSTEE_W pOwner, PTRUSTEE_W pGroup, ULONG cCountOfAccessEntries, PEXPLICIT_ACCESS_W pListOfAccessEntries, ULONG cCountOfAuditEntries, PEXPLICIT_ACCESS_W pListOfAuditEntries, PSECURITY_DESCRIPTOR pOldSD, PULONG pSizeNewSD, PSECURITY_DESCRIPTOR *pNewSD);
57 WINADVAPI DWORD WINAPI LookupSecurityDescriptorPartsA (PTRUSTEE_A *ppOwner, PTRUSTEE_A *ppGroup, PULONG pcCountOfAccessEntries, PEXPLICIT_ACCESS_A *ppListOfAccessEntries, PULONG pcCountOfAuditEntries, PEXPLICIT_ACCESS_A *ppListOfAuditEntries, PSECURITY_DESCRIPTOR pSD);
58 WINADVAPI DWORD WINAPI LookupSecurityDescriptorPartsW (PTRUSTEE_W *ppOwner, PTRUSTEE_W *ppGroup, PULONG pcCountOfAccessEntries, PEXPLICIT_ACCESS_W *ppListOfAccessEntries, PULONG pcCountOfAuditEntries, PEXPLICIT_ACCESS_W *ppListOfAuditEntries, PSECURITY_DESCRIPTOR pSD);
59 WINADVAPI VOID WINAPI BuildExplicitAccessWithNameA (PEXPLICIT_ACCESS_A pExplicitAccess, LPSTR pTrusteeName, DWORD AccessPermissions, ACCESS_MODE AccessMode, DWORD Inheritance);
60 WINADVAPI VOID WINAPI BuildExplicitAccessWithNameW (PEXPLICIT_ACCESS_W pExplicitAccess, LPWSTR pTrusteeName, DWORD AccessPermissions, ACCESS_MODE AccessMode, DWORD Inheritance);
61 WINADVAPI VOID WINAPI BuildImpersonateExplicitAccessWithNameA (PEXPLICIT_ACCESS_A pExplicitAccess, LPSTR pTrusteeName, PTRUSTEE_A pTrustee, DWORD AccessPermissions, ACCESS_MODE AccessMode, DWORD Inheritance);
62 WINADVAPI VOID WINAPI BuildImpersonateExplicitAccessWithNameW (PEXPLICIT_ACCESS_W pExplicitAccess, LPWSTR pTrusteeName, PTRUSTEE_W pTrustee, DWORD AccessPermissions, ACCESS_MODE AccessMode, DWORD Inheritance);
63 WINADVAPI VOID WINAPI BuildTrusteeWithNameA (PTRUSTEE_A pTrustee, LPSTR pName);
64 WINADVAPI VOID WINAPI BuildTrusteeWithNameW (PTRUSTEE_W pTrustee, LPWSTR pName);
65 WINADVAPI VOID WINAPI BuildImpersonateTrusteeA (PTRUSTEE_A pTrustee, PTRUSTEE_A pImpersonateTrustee);
66 WINADVAPI VOID WINAPI BuildImpersonateTrusteeW (PTRUSTEE_W pTrustee, PTRUSTEE_W pImpersonateTrustee);
67 WINADVAPI VOID WINAPI BuildTrusteeWithSidA (PTRUSTEE_A pTrustee, PSID pSid);
68 WINADVAPI VOID WINAPI BuildTrusteeWithSidW (PTRUSTEE_W pTrustee, PSID pSid);
69 WINADVAPI VOID WINAPI BuildTrusteeWithObjectsAndSidA (PTRUSTEE_A pTrustee, POBJECTS_AND_SID pObjSid, GUID *pObjectGuid, GUID *pInheritedObjectGuid, PSID pSid);
70 WINADVAPI VOID WINAPI BuildTrusteeWithObjectsAndSidW (PTRUSTEE_W pTrustee, POBJECTS_AND_SID pObjSid, GUID *pObjectGuid, GUID *pInheritedObjectGuid, PSID pSid);
71 WINADVAPI VOID WINAPI BuildTrusteeWithObjectsAndNameA (PTRUSTEE_A pTrustee, POBJECTS_AND_NAME_A pObjName, SE_OBJECT_TYPE ObjectType, LPSTR ObjectTypeName, LPSTR InheritedObjectTypeName, LPSTR Name);
72 WINADVAPI VOID WINAPI BuildTrusteeWithObjectsAndNameW (PTRUSTEE_W pTrustee, POBJECTS_AND_NAME_W pObjName, SE_OBJECT_TYPE ObjectType, LPWSTR ObjectTypeName, LPWSTR InheritedObjectTypeName, LPWSTR Name);
73 WINADVAPI LPSTR WINAPI GetTrusteeNameA (PTRUSTEE_A pTrustee);
74 WINADVAPI LPWSTR WINAPI GetTrusteeNameW (PTRUSTEE_W pTrustee);
75 WINADVAPI TRUSTEE_TYPE WINAPI GetTrusteeTypeA (PTRUSTEE_A pTrustee);
76 WINADVAPI TRUSTEE_TYPE WINAPI GetTrusteeTypeW (PTRUSTEE_W pTrustee);
77 WINADVAPI TRUSTEE_FORM WINAPI GetTrusteeFormA (PTRUSTEE_A pTrustee);
78 WINADVAPI TRUSTEE_FORM WINAPI GetTrusteeFormW (PTRUSTEE_W pTrustee);
79 WINADVAPI MULTIPLE_TRUSTEE_OPERATION WINAPI GetMultipleTrusteeOperationA (PTRUSTEE_A pTrustee);
80 WINADVAPI MULTIPLE_TRUSTEE_OPERATION WINAPI GetMultipleTrusteeOperationW (PTRUSTEE_W pTrustee);
81 WINADVAPI PTRUSTEE_A WINAPI GetMultipleTrusteeA (PTRUSTEE_A pTrustee);
82 WINADVAPI PTRUSTEE_W WINAPI GetMultipleTrusteeW (PTRUSTEE_W pTrustee);
83
84#if NTDDI_VERSION >= 0x06000000
85 WINADVAPI DWORD WINAPI TreeSetNamedSecurityInfoA (LPSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID pOwner, PSID pGroup, PACL pDacl, PACL pSacl, DWORD dwAction, FN_PROGRESS fnProgress, PROG_INVOKE_SETTING ProgressInvokeSetting, PVOID Args);
86 WINADVAPI DWORD WINAPI TreeSetNamedSecurityInfoW (LPWSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID pOwner, PSID pGroup, PACL pDacl, PACL pSacl, DWORD dwAction, FN_PROGRESS fnProgress, PROG_INVOKE_SETTING ProgressInvokeSetting, PVOID Args);
87#endif
88
89#endif /* WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) */
90
91#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
92#define SetEntriesInAcl __MINGW_NAME_AW(SetEntriesInAcl)
93#define GetExplicitEntriesFromAcl __MINGW_NAME_AW(GetExplicitEntriesFromAcl)
94#define GetNamedSecurityInfo __MINGW_NAME_AW(GetNamedSecurityInfo)
95#define SetNamedSecurityInfo __MINGW_NAME_AW(SetNamedSecurityInfo)
96
97 WINADVAPI DWORD WINAPI SetEntriesInAclA (ULONG cCountOfExplicitEntries, PEXPLICIT_ACCESS_A pListOfExplicitEntries, PACL OldAcl, PACL *NewAcl);
98 WINADVAPI DWORD WINAPI SetEntriesInAclW (ULONG cCountOfExplicitEntries, PEXPLICIT_ACCESS_W pListOfExplicitEntries, PACL OldAcl, PACL *NewAcl);
99 WINADVAPI DWORD WINAPI GetExplicitEntriesFromAclA (PACL pacl, PULONG pcCountOfExplicitEntries, PEXPLICIT_ACCESS_A *pListOfExplicitEntries);
100 WINADVAPI DWORD WINAPI GetExplicitEntriesFromAclW (PACL pacl, PULONG pcCountOfExplicitEntries, PEXPLICIT_ACCESS_W *pListOfExplicitEntries);
101 WINADVAPI DWORD WINAPI GetNamedSecurityInfoA (LPCSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID *ppsidOwner, PSID *ppsidGroup, PACL *ppDacl, PACL *ppSacl, PSECURITY_DESCRIPTOR *ppSecurityDescriptor);
102 WINADVAPI DWORD WINAPI GetNamedSecurityInfoW (LPCWSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID *ppsidOwner, PSID *ppsidGroup, PACL *ppDacl, PACL *ppSacl, PSECURITY_DESCRIPTOR *ppSecurityDescriptor);
103 WINADVAPI DWORD WINAPI GetSecurityInfo (HANDLE handle, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID *ppsidOwner, PSID *ppsidGroup, PACL *ppDacl, PACL *ppSacl, PSECURITY_DESCRIPTOR *ppSecurityDescriptor);
104 WINADVAPI DWORD WINAPI SetNamedSecurityInfoA (LPSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID psidOwner, PSID psidGroup, PACL pDacl, PACL pSacl);
105 WINADVAPI DWORD WINAPI SetNamedSecurityInfoW (LPWSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID psidOwner, PSID psidGroup, PACL pDacl, PACL pSacl);
106 WINADVAPI DWORD WINAPI SetSecurityInfo (HANDLE handle, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID psidOwner, PSID psidGroup, PACL pDacl, PACL pSacl);
107#endif /* WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) */
108
109#ifdef __cplusplus
110}
111#endif
112#endif /* __ACCESS_CONTROL_API__ */
Note: See TracBrowser for help on using the repository browser.