31{
33 DWORD dwGroupLength, dwUserLength, dwError, dwAlignLength;
39
40
41 *ppSecurityDescriptor =
NULL;
43
44
46 {
47
49 {
50
52 }
53 }
54
55
58 {
60 }
61
62
65 {
67 }
68
69
72 dwAlignLength +
73 dwGroupLength +
74 sizeof(*pSd));
76
77
79
80
83
84
86 {
88 }
89
90
93 pTokenUser,
94 dwUserLength,
95 &dwUserLength) ==
FALSE)
96 {
98 }
99
100
103 pTokenGroup,
104 dwGroupLength,
105 &dwGroupLength) ==
FALSE)
106 {
108 }
109
110
112 {
114 }
115
116
118 {
120 }
121
122
124 {
125
136 {
137
139 {
140
143 }
144 else
145 {
146
147 *ppSecurityDescriptor = pSd;
148 *ppAcl = pAcl;
150 }
151 }
152 }
153
154
156 return dwError;
157}
DWORD WINAPI SetEntriesInAclW(ULONG cCountOfExplicitEntries, PEXPLICIT_ACCESS_W pListOfExplicitEntries, PACL OldAcl, PACL *NewAcl)
BOOL MemFree(IN PVOID lpMem)
PVOID MemAlloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
#define ERROR_INSUFFICIENT_BUFFER
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision)
BOOL WINAPI OpenThreadToken(HANDLE ThreadHandle, DWORD DesiredAccess, BOOL OpenAsSelf, HANDLE *TokenHandle)
#define GetCurrentProcess()
HLOCAL NTAPI LocalFree(HLOCAL hMem)
BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bDaclPresent, PACL pDacl, BOOL bDaclDefaulted)
BOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID pOwner, BOOL bOwnerDefaulted)
BOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID pGroup, BOOL bGroupDefaulted)
DWORD grfAccessPermissions
ACCESS_MODE grfAccessMode
struct _TRUSTEE_W * pMultipleTrustee
MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation
#define ALIGN_UP(size, type)
DWORD WINAPI GetLastError(void)
HANDLE WINAPI GetCurrentThread(void)
struct _TOKEN_PRIMARY_GROUP * PTOKEN_PRIMARY_GROUP
struct _TOKEN_USER * PTOKEN_USER
struct _SECURITY_DESCRIPTOR * PISECURITY_DESCRIPTOR
#define SECURITY_DESCRIPTOR_REVISION