ReactOS 0.4.15-dev-7942-gd23573b
ac.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/advapi32/sec/ac.c
5 * PURPOSE: ACL/ACE functions
6 */
7
8#include <advapi32.h>
10
11/* --- ACE --- */
12
13/*
14 * @implemented
15 */
16BOOL
22 GUID *ObjectTypeGuid,
23 GUID *InheritedObjectTypeGuid,
24 PSID pSid)
25{
27
32 ObjectTypeGuid,
33 InheritedObjectTypeGuid,
34 pSid);
35 if (!NT_SUCCESS(Status))
36 {
38 return FALSE;
39 }
40
41 return TRUE;
42}
43
44/*
45 * @implemented
46 */
47BOOL
53 GUID* ObjectTypeGuid,
54 GUID* InheritedObjectTypeGuid,
55 PSID pSid)
56{
58
63 ObjectTypeGuid,
64 InheritedObjectTypeGuid,
65 pSid);
66 if (!NT_SUCCESS(Status))
67 {
69 return FALSE;
70 }
71
72 return TRUE;
73}
74
75/*
76 * @implemented
77 */
78BOOL
84 GUID *ObjectTypeGuid,
85 GUID *InheritedObjectTypeGuid,
86 PSID pSid,
87 BOOL bAuditSuccess,
88 BOOL bAuditFailure)
89{
91
96 ObjectTypeGuid,
97 InheritedObjectTypeGuid,
98 pSid,
99 bAuditSuccess,
100 bAuditFailure);
101 if (!NT_SUCCESS(Status))
102 {
104 return FALSE;
105 }
106
107 return TRUE;
108}
109
110/*
111 * @implemented
112 */
113DWORD
114WINAPI
117 SECURITY_INFORMATION SecurityInfo,
118 BOOL Container,
119 GUID **pObjectClassGuids OPTIONAL,
120 DWORD GuidCount,
121 PACL pAcl,
123 PGENERIC_MAPPING pGenericMapping,
124 PINHERITED_FROMW pInheritArray)
125{
127
130 {
131 /* call the MARTA provider */
134 SecurityInfo,
135 Container,
136 pObjectClassGuids,
137 GuidCount,
138 pAcl,
139 pfnArray,
140 pGenericMapping,
141 pInheritArray);
142 }
143
144 return ErrorCode;
145}
146
147
148/*
149 * @unimplemented
150 */
151DWORD
152WINAPI
155 SECURITY_INFORMATION SecurityInfo,
156 BOOL Container,
157 GUID **pObjectClassGuids OPTIONAL,
158 DWORD GuidCount,
159 PACL pAcl,
161 PGENERIC_MAPPING pGenericMapping,
162 PINHERITED_FROMA pInheritArray)
163{
164 /* That's all this function does, at least up to w2k3... Even MS was too
165 lazy to implement it... */
167}
168
169
170/*
171 * @implemented
172 */
173DWORD
174WINAPI
175FreeInheritedFromArray(PINHERITED_FROMW pInheritArray,
176 USHORT AceCnt,
178{
180
183 {
184 /* call the MARTA provider */
185 ErrorCode = AccFreeIndexArray(pInheritArray,
186 AceCnt,
187 pfnArray);
188 }
189
190 return ErrorCode;
191}
192
193
194/*
195 * @implemented
196 */
197DWORD
198WINAPI
199SetEntriesInAclW(ULONG cCountOfExplicitEntries,
200 PEXPLICIT_ACCESS_W pListOfExplicitEntries,
201 PACL OldAcl,
202 PACL *NewAcl)
203{
205
206 if (!NewAcl)
207 {
209 }
210
213 {
214 /* call the MARTA provider */
215 ErrorCode = AccRewriteSetEntriesInAcl(cCountOfExplicitEntries,
216 pListOfExplicitEntries,
217 OldAcl,
218 NewAcl);
219 }
220
221 return ErrorCode;
222}
223
224
225static DWORD
227 OUT PTRUSTEE_W *pTrusteeW)
228{
229 TRUSTEE_FORM TrusteeForm;
230 INT BufferSize = 0;
231 PSTR lpStr;
233
234 //ASSERT(sizeof(TRUSTEE_W) == sizeof(TRUSTEE_A));
235
236 TrusteeForm = GetTrusteeFormA(pTrusteeA);
237 switch (TrusteeForm)
238 {
239 case TRUSTEE_IS_NAME:
240 {
241 /* directly copy the array, this works as the size of the EXPLICIT_ACCESS_A
242 structure matches the size of the EXPLICIT_ACCESS_W version */
243 lpStr = GetTrusteeNameA(pTrusteeA);
244 if (lpStr != NULL)
245 BufferSize = strlen(lpStr) + 1;
246
247 *pTrusteeW = RtlAllocateHeap(RtlGetProcessHeap(),
248 0,
249 sizeof(TRUSTEE_W) + (BufferSize * sizeof(WCHAR)));
250 if (*pTrusteeW != NULL)
251 {
252 RtlCopyMemory(*pTrusteeW,
253 pTrusteeA,
255 ptstrName));
256
257 if (lpStr != NULL)
258 {
259 (*pTrusteeW)->ptstrName = (PWSTR)((*pTrusteeW) + 1);
260
261 /* convert the trustee's name */
263 0,
264 lpStr,
265 -1,
266 (*pTrusteeW)->ptstrName,
267 BufferSize) == 0)
268 {
269 goto ConvertErr;
270 }
271 }
272 else
273 {
274 RtlFreeHeap(RtlGetProcessHeap(),
275 0,
276 *pTrusteeW);
277 goto NothingToConvert;
278 }
279 }
280 else
282 break;
283 }
284
286 {
289 PWSTR StrBuf;
290
291 /* calculate the size needed */
294 {
296 }
297 if (oanA->ptstrName != NULL)
298 {
299 BufferSize += strlen(oanA->ptstrName) + 1;
300 }
301
302 *pTrusteeW = RtlAllocateHeap(RtlGetProcessHeap(),
303 0,
304 sizeof(TRUSTEE_W) + sizeof(OBJECTS_AND_NAME_W) +
305 (BufferSize * sizeof(WCHAR)));
306
307 if (*pTrusteeW != NULL)
308 {
309 oan = (POBJECTS_AND_NAME_W)((*pTrusteeW) + 1);
310 StrBuf = (PWSTR)(oan + 1);
311
312 /* copy over the parts of the TRUSTEE structure that don't need
313 to be touched */
314 RtlCopyMemory(*pTrusteeW,
315 pTrusteeA,
317 ptstrName));
318
319 (*pTrusteeW)->ptstrName = (LPWSTR)oan;
320
321 /* convert the OBJECTS_AND_NAME_A structure */
322 oan->ObjectsPresent = oanA->ObjectsPresent;
323 oan->ObjectType = oanA->ObjectType;
324
327 {
328 /* convert inherited object type name */
330
332 0,
334 -1,
335 StrBuf,
336 BufferSize) == 0)
337 {
338 goto ConvertErr;
339 }
340 oan->InheritedObjectTypeName = StrBuf;
341
342 StrBuf += BufferSize;
343 }
344 else
346
347 if (oanA->ptstrName != NULL)
348 {
349 /* convert the trustee name */
350 BufferSize = strlen(oanA->ptstrName) + 1;
351
353 0,
354 oanA->ptstrName,
355 -1,
356 StrBuf,
357 BufferSize) == 0)
358 {
359 goto ConvertErr;
360 }
361 oan->ptstrName = StrBuf;
362 }
363 else
364 oan->ptstrName = NULL;
365 }
366 else
368 break;
369 }
370
371 default:
372 {
373NothingToConvert:
374 /* no need to convert anything to unicode */
375 *pTrusteeW = (PTRUSTEE_W)pTrusteeA;
376 break;
377 }
378 }
379
380 return ErrorCode;
381
382ConvertErr:
384
385 /* cleanup */
386 RtlFreeHeap(RtlGetProcessHeap(),
387 0,
388 *pTrusteeW);
389
390 return ErrorCode;
391}
392
393
394static __inline VOID
396 IN PTRUSTEE_A pTrusteeA)
397{
398 if ((PVOID)pTrusteeW != (PVOID)pTrusteeA)
399 {
400 RtlFreeHeap(RtlGetProcessHeap(),
401 0,
402 pTrusteeW);
403 }
404}
405
406
407static DWORD
408InternalExplicitAccessAToW(IN ULONG cCountOfExplicitEntries,
409 IN PEXPLICIT_ACCESS_A pListOfExplicitEntriesA,
410 OUT PEXPLICIT_ACCESS_W *pListOfExplicitEntriesW)
411{
412 TRUSTEE_FORM TrusteeForm;
413 SIZE_T Size;
414 ULONG i;
415 ULONG ObjectsAndNameCount = 0;
418 LPSTR lpStr;
419
420 /* NOTE: This code assumes that the size of the TRUSTEE_A and TRUSTEE_W structure matches! */
421 //ASSERT(sizeof(TRUSTEE_A) == sizeof(TRUSTEE_W));
422
423 if (cCountOfExplicitEntries != 0)
424 {
425 /* calculate the size needed */
426 Size = cCountOfExplicitEntries * sizeof(EXPLICIT_ACCESS_W);
427 for (i = 0; i != cCountOfExplicitEntries; i++)
428 {
429 TrusteeForm = GetTrusteeFormA(&pListOfExplicitEntriesA[i].Trustee);
430
431 switch (TrusteeForm)
432 {
433 case TRUSTEE_IS_NAME:
434 {
435 lpStr = GetTrusteeNameA(&pListOfExplicitEntriesA[i].Trustee);
436 if (lpStr != NULL)
437 Size += (strlen(lpStr) + 1) * sizeof(WCHAR);
438 break;
439 }
440
442 {
443 POBJECTS_AND_NAME_A oan = (POBJECTS_AND_NAME_A)GetTrusteeNameA(&pListOfExplicitEntriesA[i].Trustee);
444
447 {
448 Size += (strlen(oan->InheritedObjectTypeName) + 1) * sizeof(WCHAR);
449 }
450
451 if (oan->ptstrName != NULL)
452 Size += (strlen(oan->ptstrName) + 1) * sizeof(WCHAR);
453
454 ObjectsAndNameCount++;
455 break;
456 }
457
458 default:
459 break;
460 }
461 }
462
463 /* allocate the array */
464 peaw = RtlAllocateHeap(RtlGetProcessHeap(),
465 0,
466 Size);
467 if (peaw != NULL)
468 {
470 POBJECTS_AND_NAME_W oan = (POBJECTS_AND_NAME_W)(peaw + cCountOfExplicitEntries);
471 LPWSTR StrBuf = (LPWSTR)(oan + ObjectsAndNameCount);
472
473 /* convert the array to unicode */
474 for (i = 0; i != cCountOfExplicitEntries; i++)
475 {
476 peaw[i].grfAccessPermissions = pListOfExplicitEntriesA[i].grfAccessPermissions;
477 peaw[i].grfAccessMode = pListOfExplicitEntriesA[i].grfAccessMode;
478 peaw[i].grfInheritance = pListOfExplicitEntriesA[i].grfInheritance;
479
480 /* convert or copy the TRUSTEE structure */
481 TrusteeForm = GetTrusteeFormA(&pListOfExplicitEntriesA[i].Trustee);
482 switch (TrusteeForm)
483 {
484 case TRUSTEE_IS_NAME:
485 {
486 lpStr = GetTrusteeNameA(&pListOfExplicitEntriesA[i].Trustee);
487 if (lpStr != NULL)
488 {
489 /* convert the trustee name */
490 BufferSize = strlen(lpStr) + 1;
491
493 0,
494 lpStr,
495 -1,
496 StrBuf,
497 BufferSize) == 0)
498 {
499 goto ConvertErr;
500 }
501 peaw[i].Trustee.ptstrName = StrBuf;
502
503 StrBuf += BufferSize;
504 }
505 else
506 goto RawTrusteeCopy;
507
508 break;
509 }
510
512 {
513 POBJECTS_AND_NAME_A oanA = (POBJECTS_AND_NAME_A)GetTrusteeNameA(&pListOfExplicitEntriesA[i].Trustee);
514
515 /* copy over the parts of the TRUSTEE structure that don't need
516 to be touched */
517 RtlCopyMemory(&peaw[i].Trustee,
518 &pListOfExplicitEntriesA[i].Trustee,
520 ptstrName));
521
522 peaw[i].Trustee.ptstrName = (LPWSTR)oan;
523
524 /* convert the OBJECTS_AND_NAME_A structure */
525 oan->ObjectsPresent = oanA->ObjectsPresent;
526 oan->ObjectType = oanA->ObjectType;
527
530 {
531 /* convert inherited object type name */
533
535 0,
537 -1,
538 StrBuf,
539 BufferSize) == 0)
540 {
541 goto ConvertErr;
542 }
543 oan->InheritedObjectTypeName = StrBuf;
544
545 StrBuf += BufferSize;
546 }
547 else
549
550 if (oanA->ptstrName != NULL)
551 {
552 /* convert the trustee name */
553 BufferSize = strlen(oanA->ptstrName) + 1;
554
556 0,
557 oanA->ptstrName,
558 -1,
559 StrBuf,
560 BufferSize) == 0)
561 {
562 goto ConvertErr;
563 }
564 oan->ptstrName = StrBuf;
565
566 StrBuf += BufferSize;
567 }
568 else
569 oan->ptstrName = NULL;
570
571 /* move on to the next OBJECTS_AND_NAME_A structure */
572 oan++;
573 break;
574 }
575
576 default:
577 {
578RawTrusteeCopy:
579 /* just copy over the TRUSTEE structure, they don't contain any
580 ansi/unicode specific data */
581 RtlCopyMemory(&peaw[i].Trustee,
582 &pListOfExplicitEntriesA[i].Trustee,
583 sizeof(TRUSTEE_A));
584 break;
585 }
586 }
587 }
588
590 *pListOfExplicitEntriesW = peaw;
591 }
592 else
594 }
595
596 return ErrorCode;
597
598ConvertErr:
600
601 /* cleanup */
602 RtlFreeHeap(RtlGetProcessHeap(),
603 0,
604 peaw);
605
606 return ErrorCode;
607}
608
609
610/*
611 * @implemented
612 */
613DWORD
614WINAPI
615SetEntriesInAclA(ULONG cCountOfExplicitEntries,
616 PEXPLICIT_ACCESS_A pListOfExplicitEntries,
617 PACL OldAcl,
618 PACL *NewAcl)
619{
620 PEXPLICIT_ACCESS_W ListOfExplicitEntriesW = NULL;
622
623 ErrorCode = InternalExplicitAccessAToW(cCountOfExplicitEntries,
624 pListOfExplicitEntries,
625 &ListOfExplicitEntriesW);
627 {
628 ErrorCode = SetEntriesInAclW(cCountOfExplicitEntries,
629 ListOfExplicitEntriesW,
630 OldAcl,
631 NewAcl);
632
633 /* free the allocated array */
634 RtlFreeHeap(RtlGetProcessHeap(),
635 0,
636 ListOfExplicitEntriesW);
637 }
638
639 return ErrorCode;
640}
641
642
643/*
644 * @implemented
645 */
646DWORD
647WINAPI
649 PULONG pcCountOfExplicitEntries,
650 PEXPLICIT_ACCESS_W *pListOfExplicitEntries)
651{
653
656 {
657 /* call the MARTA provider */
659 pcCountOfExplicitEntries,
660 pListOfExplicitEntries);
661 }
662
663 return ErrorCode;
664}
665
666
667/*
668 * @unimplemented
669 */
670DWORD
671WINAPI
673 IN PTRUSTEE_W pTrustee,
674 OUT PACCESS_MASK pAccessRights)
675{
676 FIXME("%p %p %p - stub\n", pacl, pTrustee, pAccessRights);
677
678 *pAccessRights = STANDARD_RIGHTS_ALL | SPECIFIC_RIGHTS_ALL;
679 return ERROR_SUCCESS;
680}
681
682
683/*
684 * @implemented
685 */
686DWORD
687WINAPI
689 IN PTRUSTEE_A pTrustee,
690 OUT PACCESS_MASK pAccessRights)
691{
692 PTRUSTEE_W pTrusteeW = NULL;
694
696 &pTrusteeW);
698 {
700 pTrusteeW,
701 pAccessRights);
702
704 pTrustee);
705 }
706 else
708
709 return ErrorCode;
710}
711
712
713/*
714 * @unimplemented
715 */
716DWORD
717WINAPI
719 IN PTRUSTEE_W pTrustee,
720 OUT PACCESS_MASK pSuccessfulAuditedRights,
721 OUT PACCESS_MASK pFailedAuditRights)
722{
723 FIXME("%s() not implemented!\n", __FUNCTION__);
725}
726
727
728/*
729 * @implemented
730 */
731DWORD
732WINAPI
734 IN PTRUSTEE_A pTrustee,
735 OUT PACCESS_MASK pSuccessfulAuditedRights,
736 OUT PACCESS_MASK pFailedAuditRights)
737{
738 PTRUSTEE_W pTrusteeW = NULL;
740
742 &pTrusteeW);
744 {
746 pTrusteeW,
747 pSuccessfulAuditedRights,
748 pFailedAuditRights);
749
751 pTrustee);
752 }
753 else
755
756 return ErrorCode;
757}
758
759/* EOF */
DWORD WINAPI GetEffectiveRightsFromAclA(IN PACL pacl, IN PTRUSTEE_A pTrustee, OUT PACCESS_MASK pAccessRights)
Definition: ac.c:688
DWORD WINAPI GetEffectiveRightsFromAclW(IN PACL pacl, IN PTRUSTEE_W pTrustee, OUT PACCESS_MASK pAccessRights)
Definition: ac.c:672
DWORD WINAPI GetAuditedPermissionsFromAclA(IN PACL pacl, IN PTRUSTEE_A pTrustee, OUT PACCESS_MASK pSuccessfulAuditedRights, OUT PACCESS_MASK pFailedAuditRights)
Definition: ac.c:733
DWORD WINAPI SetEntriesInAclA(ULONG cCountOfExplicitEntries, PEXPLICIT_ACCESS_A pListOfExplicitEntries, PACL OldAcl, PACL *NewAcl)
Definition: ac.c:615
static DWORD InternalExplicitAccessAToW(IN ULONG cCountOfExplicitEntries, IN PEXPLICIT_ACCESS_A pListOfExplicitEntriesA, OUT PEXPLICIT_ACCESS_W *pListOfExplicitEntriesW)
Definition: ac.c:408
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
static DWORD InternalTrusteeAToW(IN PTRUSTEE_A pTrusteeA, OUT PTRUSTEE_W *pTrusteeW)
Definition: ac.c:226
BOOL WINAPI AddAccessAllowedObjectAce(PACL pAcl, DWORD dwAceRevision, DWORD AceFlags, DWORD AccessMask, GUID *ObjectTypeGuid, GUID *InheritedObjectTypeGuid, PSID pSid)
Definition: ac.c:18
static __inline VOID InternalFreeConvertedTrustee(IN PTRUSTEE_W pTrusteeW, IN PTRUSTEE_A pTrusteeA)
Definition: ac.c:395
DWORD WINAPI GetAuditedPermissionsFromAclW(IN PACL pacl, IN PTRUSTEE_W pTrustee, OUT PACCESS_MASK pSuccessfulAuditedRights, OUT PACCESS_MASK pFailedAuditRights)
Definition: ac.c:718
BOOL WINAPI AddAccessDeniedObjectAce(PACL pAcl, DWORD dwAceRevision, DWORD AceFlags, DWORD AccessMask, GUID *ObjectTypeGuid, GUID *InheritedObjectTypeGuid, PSID pSid)
Definition: ac.c:49
DWORD WINAPI SetEntriesInAclW(ULONG cCountOfExplicitEntries, PEXPLICIT_ACCESS_W pListOfExplicitEntries, PACL OldAcl, PACL *NewAcl)
Definition: ac.c:199
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
DWORD WINAPI GetExplicitEntriesFromAclW(PACL pacl, PULONG pcCountOfExplicitEntries, PEXPLICIT_ACCESS_W *pListOfExplicitEntries)
Definition: ac.c:648
BOOL WINAPI AddAuditAccessObjectAce(PACL pAcl, DWORD dwAceRevision, DWORD AceFlags, DWORD AccessMask, GUID *ObjectTypeGuid, GUID *InheritedObjectTypeGuid, PSID pSid, BOOL bAuditSuccess, BOOL bAuditFailure)
Definition: ac.c:80
struct _OBJECTS_AND_NAME_W * POBJECTS_AND_NAME_W
enum _TRUSTEE_FORM TRUSTEE_FORM
struct _TRUSTEE_W * PTRUSTEE_W
struct _EXPLICIT_ACCESS_W EXPLICIT_ACCESS_W
@ TRUSTEE_IS_NAME
Definition: accctrl.h:190
@ TRUSTEE_IS_OBJECTS_AND_NAME
Definition: accctrl.h:193
struct _OBJECTS_AND_NAME_A * POBJECTS_AND_NAME_A
enum _SE_OBJECT_TYPE SE_OBJECT_TYPE
Definition: security.c:104
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define AccGetInheritanceSource
Definition: advapi32.h:178
DWORD CheckNtMartaPresent(VOID)
Definition: misc.c:74
#define AccRewriteGetExplicitEntriesFromAcl
Definition: advapi32.h:176
#define AccRewriteSetEntriesInAcl
Definition: advapi32.h:175
#define AccFreeIndexArray
Definition: advapi32.h:179
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
LONG NTSTATUS
Definition: precomp.h:26
#define FIXME(fmt,...)
Definition: debug.h:111
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:590
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:608
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define BufferSize
Definition: mmc.h:75
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
static const ACEFLAG AceFlags[]
Definition: security.c:2624
LPSTR WINAPI GetTrusteeNameA(PTRUSTEE_A pTrustee)
Definition: security.c:2433
TRUSTEE_FORM WINAPI GetTrusteeFormA(PTRUSTEEA pTrustee)
Definition: security.c:2406
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:109
#define SetLastError(x)
Definition: compat.h:752
#define MultiByteToWideChar
Definition: compat.h:110
#define __FUNCTION__
Definition: types.h:116
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
Status
Definition: gdiplustypes.h:25
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
#define ASSERT(a)
Definition: mode.c:44
static PSID pSid
Definition: security.c:74
ObjectType
Definition: metafile.c:81
DWORD SECURITY_INFORMATION
Definition: ms-dtyp.idl:311
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
_In_ ACCESS_MASK AccessMask
Definition: exfuncs.h:186
NTSYSAPI NTSTATUS NTAPI RtlAddAccessAllowedObjectAce(_Inout_ PACL pAcl, _In_ ULONG dwAceRevision, _In_ ULONG AceFlags, _In_ ACCESS_MASK AccessMask, _In_opt_ GUID *ObjectTypeGuid, _In_opt_ GUID *InheritedObjectTypeGuid, _In_ PSID pSid)
NTSYSAPI NTSTATUS NTAPI RtlAddAuditAccessObjectAce(_Inout_ PACL Acl, _In_ ULONG Revision, _In_ ULONG Flags, _In_ ACCESS_MASK AccessMask, _In_opt_ GUID *ObjectTypeGuid, _In_opt_ GUID *InheritedObjectTypeGuid, _In_ PSID Sid, _In_ BOOLEAN Success, _In_ BOOLEAN Failure)
_In_ ULONG dwAceRevision
Definition: rtlfuncs.h:1141
NTSYSAPI NTSTATUS NTAPI RtlAddAccessDeniedObjectAce(_Inout_ PACL pAcl, _In_ ULONG dwAceRevision, _In_ ULONG AceFlags, _In_ ACCESS_MASK AccessMask, _In_opt_ GUID *ObjectTypeGuid, _In_opt_ GUID *InheritedObjectTypeGuid, _In_ PSID pSid)
#define SPECIFIC_RIGHTS_ALL
Definition: nt_native.h:71
ACCESS_MASK * PACCESS_MASK
Definition: nt_native.h:41
#define STANDARD_RIGHTS_ALL
Definition: nt_native.h:69
unsigned short USHORT
Definition: pedump.c:61
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
DWORD grfAccessPermissions
Definition: accctrl.h:340
DWORD grfInheritance
Definition: accctrl.h:342
TRUSTEE_W Trustee
Definition: accctrl.h:343
ACCESS_MODE grfAccessMode
Definition: accctrl.h:341
DWORD ObjectsPresent
Definition: accctrl.h:356
LPSTR InheritedObjectTypeName
Definition: accctrl.h:359
SE_OBJECT_TYPE ObjectType
Definition: accctrl.h:357
LPWSTR InheritedObjectTypeName
Definition: accctrl.h:368
DWORD ObjectsPresent
Definition: accctrl.h:365
SE_OBJECT_TYPE ObjectType
Definition: accctrl.h:366
LPWSTR ptstrName
Definition: accctrl.h:217
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t * PULONG
Definition: typedefs.h:59
char * PSTR
Definition: typedefs.h:51
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int32_t INT
Definition: typedefs.h:58
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define WINAPI
Definition: msvc.h:6
#define ACE_INHERITED_OBJECT_TYPE_PRESENT
Definition: setypes.h:806
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184