ReactOS  0.4.13-dev-645-g69454b4
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
8 extern "C" {
9 #endif
10 
13 
14 DWORD
15 WINAPI
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 
27 DWORD
28 WINAPI
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)
50 DWORD
51 WINAPI
53  _In_reads_(AceCnt) PINHERITED_FROMW pInheritArray,
54  _In_ USHORT AceCnt,
56 #endif
57 
62 
63 DWORD
64 WINAPI
66  _In_ PACL pacl,
67  _Out_ PULONG pcCountOfExplicitEntries,
68  _Outptr_result_buffer_(*pcCountOfExplicitEntries) PEXPLICIT_ACCESS_A *pListOfExplicitEntries);
69 
70 DWORD
71 WINAPI
73  _In_ PACL pacl,
74  _Out_ PULONG pcCountOfExplicitEntries,
75  _Outptr_result_buffer_(*pcCountOfExplicitEntries) PEXPLICIT_ACCESS_W *pListOfExplicitEntries);
76 
77 #if (_WIN32_WINNT >= 0x0501)
78 
79 DWORD
80 WINAPI
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 
93 DWORD
94 WINAPI
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 
109 DWORD
110 WINAPI
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 
121 DWORD
122 WINAPI
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 
133 DWORD
134 WINAPI
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 
152 DWORD
153 WINAPI
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 
163 DWORD
164 WINAPI
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 
174 DWORD
175 WINAPI
177  _In_ ULONG cCountOfExplicitEntries,
178  _In_reads_opt_(cCountOfExplicitEntries) PEXPLICIT_ACCESS_A pListOfExplicitEntries,
179  _In_opt_ PACL OldAcl,
180  _Out_ PACL *NewAcl);
181 
182 DWORD
183 WINAPI
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 SetSecurityInfo(_In_ HANDLE, _In_ SE_OBJECT_TYPE, _In_ SECURITY_INFORMATION, _In_opt_ PSID, _In_opt_ PSID, _In_opt_ PACL, _In_opt_ PACL)
DWORD WINAPI SetEntriesInAclA(_In_ ULONG cCountOfExplicitEntries, _In_reads_opt_(cCountOfExplicitEntries) PEXPLICIT_ACCESS_A pListOfExplicitEntries, _In_opt_ PACL OldAcl, _Out_ PACL *NewAcl)
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)
ObjectType
Definition: metafile.c:80
LPWSTR WINAPI GetTrusteeNameW(_In_ PTRUSTEE_W)
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 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)
VOID WINAPI BuildImpersonateTrusteeW(_Inout_ PTRUSTEE_W, _In_opt_ PTRUSTEE_W)
TRUSTEE_TYPE WINAPI GetTrusteeTypeA(_In_opt_ PTRUSTEE_A)
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
VOID WINAPI BuildImpersonateExplicitAccessWithNameW(_Inout_ PEXPLICIT_ACCESS_W, _In_opt_ LPWSTR, _In_opt_ PTRUSTEE_W, _In_ DWORD, _In_ ACCESS_MODE, _In_ DWORD)
enum _MULTIPLE_TRUSTEE_OPERATION MULTIPLE_TRUSTEE_OPERATION
VOID WINAPI BuildTrusteeWithNameA(_Inout_ PTRUSTEE_A, _In_opt_ LPSTR)
#define _In_reads_(size)
Definition: no_sal2.h:228
enum _ACCESS_MODE ACCESS_MODE
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)
PTRUSTEE_A WINAPI GetMultipleTrusteeA(_In_opt_ PTRUSTEE_A)
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)
char * LPSTR
Definition: xmlstorage.h:182
enum _TRUSTEE_TYPE TRUSTEE_TYPE
#define _In_opt_
Definition: no_sal2.h:213
MULTIPLE_TRUSTEE_OPERATION WINAPI GetMultipleTrusteeOperationA(_In_opt_ PTRUSTEE_A)
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)
VOID WINAPI BuildTrusteeWithSidW(_Inout_ PTRUSTEE_W, _In_opt_ PSID)
DWORD WINAPI FreeInheritedFromArray(PINHERITED_FROMW pInheritArray, USHORT AceCnt, PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL)
Definition: ac.c:175
unsigned int BOOL
Definition: ntddk_ex.h:94
DWORD SECURITY_INFORMATION
Definition: ms-dtyp.idl:311
VOID WINAPI BuildImpersonateTrusteeA(_Inout_ PTRUSTEE_A, _In_opt_ PTRUSTEE_A)
DWORD WINAPI GetAuditedPermissionsFromAclA(_In_ PACL, _In_ PTRUSTEE_A, _Out_ PACCESS_MASK, _Out_ PACCESS_MASK)
MULTIPLE_TRUSTEE_OPERATION WINAPI GetMultipleTrusteeOperationW(_In_opt_ PTRUSTEE_W)
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)
#define _Out_
Definition: no_sal2.h:323
VOID WINAPI BuildTrusteeWithObjectsAndSidW(_Inout_ PTRUSTEE_W, _In_opt_ POBJECTS_AND_SID, _In_opt_ GUID *, _In_opt_ GUID *, _In_opt_ PSID)
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)
#define _Out_opt_
Definition: no_sal2.h:339
DWORD WINAPI SetEntriesInAclW(_In_ ULONG cCountOfExplicitEntries, _In_reads_opt_(cCountOfExplicitEntries) PEXPLICIT_ACCESS_W pListOfExplicitEntries, _In_opt_ PACL OldAcl, _Out_ PACL *NewAcl)
DWORD WINAPI SetNamedSecurityInfoW(_In_ LPWSTR, _In_ SE_OBJECT_TYPE, _In_ SECURITY_INFORMATION, _In_opt_ PSID, _In_opt_ PSID, _In_opt_ PACL, _In_opt_ PACL)
#define _Outptr_result_buffer_(size)
Definition: no_sal2.h:414
#define WINAPI
Definition: msvc.h:8
DWORD WINAPI GetExplicitEntriesFromAclA(_In_ PACL pacl, _Out_ PULONG pcCountOfExplicitEntries, _Outptr_result_buffer_(*pcCountOfExplicitEntries) PEXPLICIT_ACCESS_A *pListOfExplicitEntries)
unsigned long DWORD
Definition: ntddk_ex.h:95
#define _Inout_
Definition: no_sal2.h:244
VOID WINAPI BuildTrusteeWithObjectsAndSidA(_Inout_ PTRUSTEE_A, _In_opt_ POBJECTS_AND_SID, _In_opt_ GUID *, _In_opt_ GUID *, _In_opt_ PSID)
VOID WINAPI BuildImpersonateExplicitAccessWithNameA(_Inout_ PEXPLICIT_ACCESS_A, _In_opt_ LPSTR, _In_opt_ PTRUSTEE_A, _In_ DWORD, _In_ ACCESS_MODE, _In_ DWORD)
DWORD WINAPI SetNamedSecurityInfoA(_In_ LPSTR, _In_ SE_OBJECT_TYPE, _In_ SECURITY_INFORMATION, _In_opt_ PSID, _In_opt_ PSID, _In_opt_ PACL, _In_opt_ PACL)
VOID WINAPI BuildExplicitAccessWithNameA(_Inout_ PEXPLICIT_ACCESS_A, _In_opt_ LPSTR, _In_ DWORD, _In_ ACCESS_MODE, _In_ DWORD)
#define _Outptr_result_buffer_maybenull_(size)
Definition: no_sal2.h:417
VOID WINAPI BuildExplicitAccessWithNameW(_Inout_ PEXPLICIT_ACCESS_W, _In_opt_ LPWSTR, _In_ DWORD, _In_ ACCESS_MODE, _In_ DWORD)
LPSTR WINAPI GetTrusteeNameA(_In_ PTRUSTEE_A)
PTRUSTEE_W WINAPI GetMultipleTrusteeW(_In_opt_ PTRUSTEE_W)
#define _In_
Definition: no_sal2.h:204
DWORD WINAPI GetAuditedPermissionsFromAclW(_In_ PACL, _In_ PTRUSTEE_W, _Out_ PACCESS_MASK, _Out_ PACCESS_MASK)
TRUSTEE_FORM WINAPI GetTrusteeFormW(_In_ PTRUSTEE_W)
unsigned short USHORT
Definition: pedump.c:61
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
VOID WINAPI BuildTrusteeWithNameW(_Inout_ PTRUSTEE_W, _In_opt_ LPWSTR)
unsigned int * PULONG
Definition: retypes.h:1
#define _In_reads_opt_(size)
Definition: no_sal2.h:231
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)
DWORD WINAPI GetEffectiveRightsFromAclA(_In_ PACL, _In_ PTRUSTEE_A, _Out_ PACCESS_MASK)
#define _Outptr_result_bytebuffer_(size)
Definition: no_sal2.h:420
unsigned int ULONG
Definition: retypes.h:1
ACCESS_MASK * PACCESS_MASK
Definition: nt_native.h:41
DWORD WINAPI GetEffectiveRightsFromAclW(_In_ PACL, _In_ PTRUSTEE_W, _Out_ PACCESS_MASK)
DWORD WINAPI GetExplicitEntriesFromAclW(_In_ PACL pacl, _Out_ PULONG pcCountOfExplicitEntries, _Outptr_result_buffer_(*pcCountOfExplicitEntries) PEXPLICIT_ACCESS_W *pListOfExplicitEntries)
WCHAR * LPWSTR
Definition: xmlstorage.h:184
TRUSTEE_FORM WINAPI GetTrusteeFormA(_In_ PTRUSTEE_A)
enum _TRUSTEE_FORM TRUSTEE_FORM
VOID WINAPI BuildTrusteeWithSidA(_Inout_ PTRUSTEE_A, _In_opt_ PSID)
enum _SE_OBJECT_TYPE SE_OBJECT_TYPE
Definition: security.c:104