ReactOS 0.4.15-dev-7928-g68a8619
aclapi.h
Go to the documentation of this file.
1#ifndef _ACLAPI_H
2#define _ACLAPI_H
3
4#include <windows.h>
5#include <accctrl.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
13
17 _In_opt_ PTRUSTEE_A pOwner,
18 _In_opt_ PTRUSTEE_A pGroup,
19 _In_ ULONG cCountOfAccessEntries,
20 _In_reads_opt_(cCountOfAccessEntries) PEXPLICIT_ACCESS_A pListOfAccessEntries,
21 _In_ ULONG cCountOfAuditEntries,
22 _In_reads_opt_(cCountOfAuditEntries) PEXPLICIT_ACCESS_A pListOfAuditEntries,
24 _Out_ PULONG pSizeNewSD,
26
30 _In_opt_ PTRUSTEE_W pOwner,
31 _In_opt_ PTRUSTEE_W pGroup,
32 _In_ ULONG cCountOfAccessEntries,
33 _In_reads_opt_(cCountOfAccessEntries) PEXPLICIT_ACCESS_W pListOfAccessEntries,
34 _In_ ULONG cCountOfAuditEntries,
35 _In_reads_opt_(cCountOfAuditEntries) PEXPLICIT_ACCESS_W pListOfAuditEntries,
37 _Out_ PULONG pSizeNewSD,
39
48
49#if (_WIN32_WINNT >= 0x0501)
53 _In_reads_(AceCnt) PINHERITED_FROMW pInheritArray,
54 _In_ USHORT AceCnt,
56#endif
57
62
66 _In_ PACL pacl,
67 _Out_ PULONG pcCountOfExplicitEntries,
68 _Outptr_result_buffer_(*pcCountOfExplicitEntries) PEXPLICIT_ACCESS_A *pListOfExplicitEntries);
69
73 _In_ PACL pacl,
74 _Out_ PULONG pcCountOfExplicitEntries,
75 _Outptr_result_buffer_(*pcCountOfExplicitEntries) PEXPLICIT_ACCESS_W *pListOfExplicitEntries);
76
77#if (_WIN32_WINNT >= 0x0501)
78
82 _In_ LPSTR pObjectName,
84 _In_ SECURITY_INFORMATION SecurityInfo,
85 _In_ BOOL Container,
86 _In_reads_opt_(GuidCount) GUID **pObjectClassGuids,
87 _In_ DWORD GuidCount,
88 _In_ PACL pAcl,
90 _In_ PGENERIC_MAPPING pGenericMapping,
91 _Out_ PINHERITED_FROMA pInheritArray);
92
96 _In_ LPWSTR pObjectName,
98 _In_ SECURITY_INFORMATION SecurityInfo,
99 _In_ BOOL Container,
100 _In_reads_opt_(GuidCount) GUID **pObjectClassGuids,
101 _In_ DWORD GuidCount,
102 _In_ PACL pAcl,
104 _In_ PGENERIC_MAPPING pGenericMapping,
105 _Out_ PINHERITED_FROMW pInheritArray);
106
107#endif
108
109DWORD
110WINAPI
112 _In_ LPSTR pObjectName,
114 _In_ SECURITY_INFORMATION SecurityInfo,
115 _Out_opt_ PSID *ppsidOwner,
116 _Out_opt_ PSID *ppsidGroup,
117 _Out_opt_ PACL *ppDacl,
118 _Out_opt_ PACL *ppSacl,
119 _Out_ PSECURITY_DESCRIPTOR *ppSecurityDescriptor);
120
121DWORD
122WINAPI
124 _In_ LPWSTR pObjectName,
126 _In_ SECURITY_INFORMATION SecurityInfo,
127 _Out_opt_ PSID *ppsidOwner,
128 _Out_opt_ PSID *ppsidGroup,
129 _Out_opt_ PACL *ppDacl,
130 _Out_opt_ PACL *ppSacl,
131 _Out_ PSECURITY_DESCRIPTOR *ppSecurityDescriptor);
132
133DWORD
134WINAPI
138 _In_ SECURITY_INFORMATION SecurityInfo,
139 _Out_opt_ PSID *ppsidOwner,
140 _Out_opt_ PSID *ppsidGroup,
141 _Out_opt_ PACL *ppDacl,
142 _Out_opt_ PACL *ppSacl,
143 _Out_opt_ PSECURITY_DESCRIPTOR *ppSecurityDescriptor);
144
151
152DWORD
153WINAPI
155 _Out_opt_ PTRUSTEE_A *ppOwner,
156 _Out_opt_ PTRUSTEE_A *ppGroup,
157 _Out_opt_ PULONG pcCountOfAccessEntries,
158 _Outptr_result_buffer_maybenull_(*pcCountOfAccessEntries) PEXPLICIT_ACCESS_A *ppListOfAccessEntries,
159 _Out_opt_ PULONG pcCountOfAuditEntries,
160 _Outptr_result_buffer_maybenull_(*pcCountOfAuditEntries) PEXPLICIT_ACCESS_A *ppListOfAuditEntries,
162
163DWORD
164WINAPI
166 _Out_opt_ PTRUSTEE_W *ppOwner,
167 _Out_opt_ PTRUSTEE_W *ppGroup,
168 _Out_opt_ PULONG pcCountOfAccessEntries,
169 _Outptr_result_buffer_maybenull_(*pcCountOfAccessEntries) PEXPLICIT_ACCESS_W *ppListOfAccessEntries,
170 _Out_opt_ PULONG pcCountOfAuditEntries,
171 _Outptr_result_buffer_maybenull_(*pcCountOfAuditEntries) PEXPLICIT_ACCESS_W *ppListOfAuditEntries,
173
174DWORD
175WINAPI
177 _In_ ULONG cCountOfExplicitEntries,
178 _In_reads_opt_(cCountOfExplicitEntries) PEXPLICIT_ACCESS_A pListOfExplicitEntries,
179 _In_opt_ PACL OldAcl,
180 _Out_ PACL *NewAcl);
181
182DWORD
183WINAPI
185 _In_ ULONG cCountOfExplicitEntries,
186 _In_reads_opt_(cCountOfExplicitEntries) PEXPLICIT_ACCESS_W pListOfExplicitEntries,
187 _In_opt_ PACL OldAcl,
188 _Out_ PACL *NewAcl);
189
201
202#ifdef UNICODE
203#define BuildExplicitAccessWithName BuildExplicitAccessWithNameW
204#define BuildSecurityDescriptor BuildSecurityDescriptorW
205#define BuildTrusteeWithName BuildTrusteeWithNameW
206#define BuildTrusteeWithObjectsAndName BuildTrusteeWithObjectsAndNameW
207#define BuildTrusteeWithObjectsAndSid BuildTrusteeWithObjectsAndSidW
208#define BuildTrusteeWithSid BuildTrusteeWithSidW
209#define GetAuditedPermissionsFromAcl GetAuditedPermissionsFromAclW
210#define GetEffectiveRightsFromAcl GetEffectiveRightsFromAclW
211#define GetExplicitEntriesFromAcl GetExplicitEntriesFromAclW
212#define GetInheritanceSource GetInheritanceSourceW
213#define GetNamedSecurityInfo GetNamedSecurityInfoW
214#define GetTrusteeForm GetTrusteeFormW
215#define GetTrusteeName GetTrusteeNameW
216#define GetTrusteeType GetTrusteeTypeW
217#define LookupSecurityDescriptorParts LookupSecurityDescriptorPartsW
218#define SetEntriesInAcl SetEntriesInAclW
219#define SetNamedSecurityInfo SetNamedSecurityInfoW
220#define BuildImpersonateExplicitAccessWithName BuildImpersonateExplicitAccessWithNameW
221#define BuildImpersonateTrustee BuildImpersonateTrusteeW
222#define GetMultipleTrustee GetMultipleTrusteeW
223#define GetMultipleTrusteeOperation GetMultipleTrusteeOperationW
224#else
225#define BuildExplicitAccessWithName BuildExplicitAccessWithNameA
226#define BuildSecurityDescriptor BuildSecurityDescriptorA
227#define BuildTrusteeWithName BuildTrusteeWithNameA
228#define BuildTrusteeWithObjectsAndName BuildTrusteeWithObjectsAndNameA
229#define BuildTrusteeWithObjectsAndSid BuildTrusteeWithObjectsAndSidA
230#define BuildTrusteeWithSid BuildTrusteeWithSidA
231#define GetAuditedPermissionsFromAcl GetAuditedPermissionsFromAclA
232#define GetEffectiveRightsFromAcl GetEffectiveRightsFromAclA
233#define GetExplicitEntriesFromAcl GetExplicitEntriesFromAclA
234#define GetInheritanceSource GetInheritanceSourceA
235#define GetNamedSecurityInfo GetNamedSecurityInfoA
236#define GetTrusteeForm GetTrusteeFormA
237#define GetTrusteeName GetTrusteeNameA
238#define GetTrusteeType GetTrusteeTypeA
239#define LookupSecurityDescriptorParts LookupSecurityDescriptorPartsA
240#define SetEntriesInAcl SetEntriesInAclA
241#define SetNamedSecurityInfo SetNamedSecurityInfoA
242#define BuildImpersonateExplicitAccessWithName BuildImpersonateExplicitAccessWithNameA
243#define BuildImpersonateTrustee BuildImpersonateTrusteeA
244#define GetMultipleTrustee GetMultipleTrusteeA
245#define GetMultipleTrusteeOperation GetMultipleTrusteeOperationA
246#endif /* UNICODE */
247
248#ifdef __cplusplus
249}
250#endif
251#endif
DWORD WINAPI GetInheritanceSourceW(LPWSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, BOOL Container, GUID **pObjectClassGuids OPTIONAL, DWORD GuidCount, PACL pAcl, PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL, PGENERIC_MAPPING pGenericMapping, PINHERITED_FROMW pInheritArray)
Definition: ac.c:115
DWORD WINAPI FreeInheritedFromArray(PINHERITED_FROMW pInheritArray, USHORT AceCnt, PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL)
Definition: ac.c:175
DWORD WINAPI GetInheritanceSourceA(LPSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, BOOL Container, GUID **pObjectClassGuids OPTIONAL, DWORD GuidCount, PACL pAcl, PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL, PGENERIC_MAPPING pGenericMapping, PINHERITED_FROMA pInheritArray)
Definition: ac.c:153
enum _ACCESS_MODE ACCESS_MODE
enum _TRUSTEE_FORM TRUSTEE_FORM
enum _TRUSTEE_TYPE TRUSTEE_TYPE
enum _SE_OBJECT_TYPE SE_OBJECT_TYPE
Definition: security.c:104
enum _MULTIPLE_TRUSTEE_OPERATION MULTIPLE_TRUSTEE_OPERATION
DWORD WINAPI SetEntriesInAclA(_In_ ULONG cCountOfExplicitEntries, _In_reads_opt_(cCountOfExplicitEntries) PEXPLICIT_ACCESS_A pListOfExplicitEntries, _In_opt_ PACL OldAcl, _Out_ PACL *NewAcl)
VOID WINAPI BuildImpersonateExplicitAccessWithNameW(_Inout_ PEXPLICIT_ACCESS_W, _In_opt_ LPWSTR, _In_opt_ PTRUSTEE_W, _In_ DWORD, _In_ ACCESS_MODE, _In_ DWORD)
VOID WINAPI BuildTrusteeWithObjectsAndSidA(_Inout_ PTRUSTEE_A, _In_opt_ POBJECTS_AND_SID, _In_opt_ GUID *, _In_opt_ GUID *, _In_opt_ PSID)
VOID WINAPI BuildTrusteeWithObjectsAndNameA(_Inout_ PTRUSTEE_A, _In_opt_ POBJECTS_AND_NAME_A, _In_opt_ SE_OBJECT_TYPE, _In_opt_ LPSTR, _In_opt_ LPSTR, _In_opt_ LPSTR)
DWORD WINAPI GetEffectiveRightsFromAclW(_In_ PACL, _In_ PTRUSTEE_W, _Out_ PACCESS_MASK)
DWORD WINAPI GetExplicitEntriesFromAclA(_In_ PACL pacl, _Out_ PULONG pcCountOfExplicitEntries, _Outptr_result_buffer_(*pcCountOfExplicitEntries) PEXPLICIT_ACCESS_A *pListOfExplicitEntries)
DWORD WINAPI GetNamedSecurityInfoA(_In_ LPSTR pObjectName, _In_ SE_OBJECT_TYPE ObjectType, _In_ SECURITY_INFORMATION SecurityInfo, _Out_opt_ PSID *ppsidOwner, _Out_opt_ PSID *ppsidGroup, _Out_opt_ PACL *ppDacl, _Out_opt_ PACL *ppSacl, _Out_ PSECURITY_DESCRIPTOR *ppSecurityDescriptor)
DWORD WINAPI SetSecurityInfo(_In_ HANDLE, _In_ SE_OBJECT_TYPE, _In_ SECURITY_INFORMATION, _In_opt_ PSID, _In_opt_ PSID, _In_opt_ PACL, _In_opt_ PACL)
DWORD WINAPI BuildSecurityDescriptorA(_In_opt_ PTRUSTEE_A pOwner, _In_opt_ PTRUSTEE_A pGroup, _In_ ULONG cCountOfAccessEntries, _In_reads_opt_(cCountOfAccessEntries) PEXPLICIT_ACCESS_A pListOfAccessEntries, _In_ ULONG cCountOfAuditEntries, _In_reads_opt_(cCountOfAuditEntries) PEXPLICIT_ACCESS_A pListOfAuditEntries, _In_opt_ PSECURITY_DESCRIPTOR pOldSD, _Out_ PULONG pSizeNewSD, _Outptr_result_bytebuffer_(*pSizeNewSD) PSECURITY_DESCRIPTOR *pNewSD)
MULTIPLE_TRUSTEE_OPERATION WINAPI GetMultipleTrusteeOperationW(_In_opt_ PTRUSTEE_W)
PTRUSTEE_A WINAPI GetMultipleTrusteeA(_In_opt_ PTRUSTEE_A)
LPWSTR WINAPI GetTrusteeNameW(_In_ PTRUSTEE_W)
PTRUSTEE_W WINAPI GetMultipleTrusteeW(_In_opt_ PTRUSTEE_W)
TRUSTEE_FORM WINAPI GetTrusteeFormW(_In_ PTRUSTEE_W)
VOID WINAPI BuildTrusteeWithNameA(_Inout_ PTRUSTEE_A, _In_opt_ LPSTR)
VOID WINAPI BuildExplicitAccessWithNameA(_Inout_ PEXPLICIT_ACCESS_A, _In_opt_ LPSTR, _In_ DWORD, _In_ ACCESS_MODE, _In_ DWORD)
VOID WINAPI BuildImpersonateTrusteeA(_Inout_ PTRUSTEE_A, _In_opt_ PTRUSTEE_A)
LPSTR WINAPI GetTrusteeNameA(_In_ PTRUSTEE_A)
VOID WINAPI BuildTrusteeWithObjectsAndNameW(_Inout_ PTRUSTEE_W, _In_opt_ POBJECTS_AND_NAME_W, _In_opt_ SE_OBJECT_TYPE, _In_opt_ LPWSTR, _In_opt_ LPWSTR, _In_opt_ LPWSTR)
DWORD WINAPI GetEffectiveRightsFromAclA(_In_ PACL, _In_ PTRUSTEE_A, _Out_ PACCESS_MASK)
VOID WINAPI BuildTrusteeWithNameW(_Inout_ PTRUSTEE_W, _In_opt_ LPWSTR)
VOID WINAPI BuildImpersonateExplicitAccessWithNameA(_Inout_ PEXPLICIT_ACCESS_A, _In_opt_ LPSTR, _In_opt_ PTRUSTEE_A, _In_ DWORD, _In_ ACCESS_MODE, _In_ DWORD)
VOID WINAPI BuildImpersonateTrusteeW(_Inout_ PTRUSTEE_W, _In_opt_ PTRUSTEE_W)
VOID WINAPI BuildTrusteeWithSidW(_Inout_ PTRUSTEE_W, _In_opt_ PSID)
DWORD WINAPI GetAuditedPermissionsFromAclW(_In_ PACL, _In_ PTRUSTEE_W, _Out_ PACCESS_MASK, _Out_ PACCESS_MASK)
DWORD WINAPI GetAuditedPermissionsFromAclA(_In_ PACL, _In_ PTRUSTEE_A, _Out_ PACCESS_MASK, _Out_ PACCESS_MASK)
TRUSTEE_TYPE WINAPI GetTrusteeTypeA(_In_opt_ PTRUSTEE_A)
DWORD WINAPI GetSecurityInfo(_In_ HANDLE handle, _In_ SE_OBJECT_TYPE ObjectType, _In_ SECURITY_INFORMATION SecurityInfo, _Out_opt_ PSID *ppsidOwner, _Out_opt_ PSID *ppsidGroup, _Out_opt_ PACL *ppDacl, _Out_opt_ PACL *ppSacl, _Out_opt_ PSECURITY_DESCRIPTOR *ppSecurityDescriptor)
DWORD WINAPI LookupSecurityDescriptorPartsW(_Out_opt_ PTRUSTEE_W *ppOwner, _Out_opt_ PTRUSTEE_W *ppGroup, _Out_opt_ PULONG pcCountOfAccessEntries, _Outptr_result_buffer_maybenull_(*pcCountOfAccessEntries) PEXPLICIT_ACCESS_W *ppListOfAccessEntries, _Out_opt_ PULONG pcCountOfAuditEntries, _Outptr_result_buffer_maybenull_(*pcCountOfAuditEntries) PEXPLICIT_ACCESS_W *ppListOfAuditEntries, _In_ PSECURITY_DESCRIPTOR pSD)
VOID WINAPI BuildTrusteeWithObjectsAndSidW(_Inout_ PTRUSTEE_W, _In_opt_ POBJECTS_AND_SID, _In_opt_ GUID *, _In_opt_ GUID *, _In_opt_ PSID)
MULTIPLE_TRUSTEE_OPERATION WINAPI GetMultipleTrusteeOperationA(_In_opt_ PTRUSTEE_A)
DWORD WINAPI SetEntriesInAclW(_In_ ULONG cCountOfExplicitEntries, _In_reads_opt_(cCountOfExplicitEntries) PEXPLICIT_ACCESS_W pListOfExplicitEntries, _In_opt_ PACL OldAcl, _Out_ PACL *NewAcl)
VOID WINAPI BuildExplicitAccessWithNameW(_Inout_ PEXPLICIT_ACCESS_W, _In_opt_ LPWSTR, _In_ DWORD, _In_ ACCESS_MODE, _In_ DWORD)
DWORD WINAPI BuildSecurityDescriptorW(_In_opt_ PTRUSTEE_W pOwner, _In_opt_ PTRUSTEE_W pGroup, _In_ ULONG cCountOfAccessEntries, _In_reads_opt_(cCountOfAccessEntries) PEXPLICIT_ACCESS_W pListOfAccessEntries, _In_ ULONG cCountOfAuditEntries, _In_reads_opt_(cCountOfAuditEntries) PEXPLICIT_ACCESS_W pListOfAuditEntries, _In_opt_ PSECURITY_DESCRIPTOR pOldSD, _Out_ PULONG pSizeNewSD, _Outptr_result_bytebuffer_(*pSizeNewSD) PSECURITY_DESCRIPTOR *pNewSD)
DWORD WINAPI SetNamedSecurityInfoW(_In_ LPWSTR, _In_ SE_OBJECT_TYPE, _In_ SECURITY_INFORMATION, _In_opt_ PSID, _In_opt_ PSID, _In_opt_ PACL, _In_opt_ PACL)
TRUSTEE_FORM WINAPI GetTrusteeFormA(_In_ PTRUSTEE_A)
VOID WINAPI BuildTrusteeWithSidA(_Inout_ PTRUSTEE_A, _In_opt_ PSID)
DWORD WINAPI LookupSecurityDescriptorPartsA(_Out_opt_ PTRUSTEE_A *ppOwner, _Out_opt_ PTRUSTEE_A *ppGroup, _Out_opt_ PULONG pcCountOfAccessEntries, _Outptr_result_buffer_maybenull_(*pcCountOfAccessEntries) PEXPLICIT_ACCESS_A *ppListOfAccessEntries, _Out_opt_ PULONG pcCountOfAuditEntries, _Outptr_result_buffer_maybenull_(*pcCountOfAuditEntries) PEXPLICIT_ACCESS_A *ppListOfAuditEntries, _In_ PSECURITY_DESCRIPTOR pSD)
DWORD WINAPI SetNamedSecurityInfoA(_In_ LPSTR, _In_ SE_OBJECT_TYPE, _In_ SECURITY_INFORMATION, _In_opt_ PSID, _In_opt_ PSID, _In_opt_ PACL, _In_opt_ PACL)
DWORD WINAPI GetExplicitEntriesFromAclW(_In_ PACL pacl, _Out_ PULONG pcCountOfExplicitEntries, _Outptr_result_buffer_(*pcCountOfExplicitEntries) PEXPLICIT_ACCESS_W *pListOfExplicitEntries)
DWORD WINAPI GetNamedSecurityInfoW(_In_ LPWSTR pObjectName, _In_ SE_OBJECT_TYPE ObjectType, _In_ SECURITY_INFORMATION SecurityInfo, _Out_opt_ PSID *ppsidOwner, _Out_opt_ PSID *ppsidGroup, _Out_opt_ PACL *ppDacl, _Out_opt_ PACL *ppSacl, _Out_ PSECURITY_DESCRIPTOR *ppSecurityDescriptor)
TRUSTEE_TYPE WINAPI GetTrusteeTypeW(_In_opt_ PTRUSTEE_W)
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
ObjectType
Definition: metafile.c:81
DWORD SECURITY_INFORMATION
Definition: ms-dtyp.idl:311
#define _Outptr_result_bytebuffer_(size)
Definition: ms_sal.h:472
#define _Out_opt_
Definition: ms_sal.h:346
#define _Inout_
Definition: ms_sal.h:378
#define _Out_
Definition: ms_sal.h:345
#define _In_reads_opt_(size)
Definition: ms_sal.h:320
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
#define _Outptr_result_buffer_(size)
Definition: ms_sal.h:456
#define _Outptr_result_buffer_maybenull_(size)
Definition: ms_sal.h:464
#define _In_reads_(size)
Definition: ms_sal.h:319
ACCESS_MASK * PACCESS_MASK
Definition: nt_native.h:41
unsigned short USHORT
Definition: pedump.c:61
uint32_t * PULONG
Definition: typedefs.h:59
uint32_t ULONG
Definition: typedefs.h:59
#define WINAPI
Definition: msvc.h:6
char * LPSTR
Definition: xmlstorage.h:182
WCHAR * LPWSTR
Definition: xmlstorage.h:184