ReactOS  0.4.15-dev-2354-g9e947e2
sid.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS kernel
4  * FILE: ntoskrnl/se/sid.c
5  * PURPOSE: Security manager
6  *
7  * PROGRAMMERS: David Welch <welch@cwcom.net>
8  */
9 
10 /* INCLUDES *******************************************************************/
11 
12 #include <ntoskrnl.h>
13 #define NDEBUG
14 #include <debug.h>
15 
16 #define TAG_SID_AND_ATTRIBUTES 'aSeS'
17 
18 /* GLOBALS ********************************************************************/
19 
25 
56 
57 /* FUNCTIONS ******************************************************************/
58 
59 VOID
60 NTAPI
62 {
91 }
92 
93 CODE_SEG("INIT")
94 BOOLEAN
95 NTAPI
97 {
98  ULONG SidLength0;
99  ULONG SidLength1;
100  ULONG SidLength2;
101  PULONG SubAuthority;
102 
103  SidLength0 = RtlLengthRequiredSid(0);
104  SidLength1 = RtlLengthRequiredSid(1);
105  SidLength2 = RtlLengthRequiredSid(2);
106 
107  /* create NullSid */
138 
139  if (SeNullSid == NULL || SeWorldSid == NULL ||
143  SeDialupSid == NULL || SeNetworkSid == NULL || SeBatchSid == NULL ||
154  {
156  return FALSE;
157  }
158 
189 
190  SubAuthority = RtlSubAuthoritySid(SeNullSid, 0);
191  *SubAuthority = SECURITY_NULL_RID;
192  SubAuthority = RtlSubAuthoritySid(SeWorldSid, 0);
193  *SubAuthority = SECURITY_WORLD_RID;
194  SubAuthority = RtlSubAuthoritySid(SeLocalSid, 0);
195  *SubAuthority = SECURITY_LOCAL_RID;
196  SubAuthority = RtlSubAuthoritySid(SeCreatorOwnerSid, 0);
197  *SubAuthority = SECURITY_CREATOR_OWNER_RID;
198  SubAuthority = RtlSubAuthoritySid(SeCreatorGroupSid, 0);
199  *SubAuthority = SECURITY_CREATOR_GROUP_RID;
200  SubAuthority = RtlSubAuthoritySid(SeCreatorOwnerServerSid, 0);
201  *SubAuthority = SECURITY_CREATOR_OWNER_SERVER_RID;
202  SubAuthority = RtlSubAuthoritySid(SeCreatorGroupServerSid, 0);
203  *SubAuthority = SECURITY_CREATOR_GROUP_SERVER_RID;
204  SubAuthority = RtlSubAuthoritySid(SeDialupSid, 0);
205  *SubAuthority = SECURITY_DIALUP_RID;
206  SubAuthority = RtlSubAuthoritySid(SeNetworkSid, 0);
207  *SubAuthority = SECURITY_NETWORK_RID;
208  SubAuthority = RtlSubAuthoritySid(SeBatchSid, 0);
209  *SubAuthority = SECURITY_BATCH_RID;
210  SubAuthority = RtlSubAuthoritySid(SeInteractiveSid, 0);
211  *SubAuthority = SECURITY_INTERACTIVE_RID;
212  SubAuthority = RtlSubAuthoritySid(SeServiceSid, 0);
213  *SubAuthority = SECURITY_SERVICE_RID;
214  SubAuthority = RtlSubAuthoritySid(SePrincipalSelfSid, 0);
215  *SubAuthority = SECURITY_PRINCIPAL_SELF_RID;
216  SubAuthority = RtlSubAuthoritySid(SeLocalSystemSid, 0);
217  *SubAuthority = SECURITY_LOCAL_SYSTEM_RID;
218  SubAuthority = RtlSubAuthoritySid(SeAuthenticatedUserSid, 0);
219  *SubAuthority = SECURITY_AUTHENTICATED_USER_RID;
220  SubAuthority = RtlSubAuthoritySid(SeRestrictedCodeSid, 0);
221  *SubAuthority = SECURITY_RESTRICTED_CODE_RID;
222  SubAuthority = RtlSubAuthoritySid(SeAliasAdminsSid, 0);
223  *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID;
224  SubAuthority = RtlSubAuthoritySid(SeAliasAdminsSid, 1);
225  *SubAuthority = DOMAIN_ALIAS_RID_ADMINS;
226  SubAuthority = RtlSubAuthoritySid(SeAliasUsersSid, 0);
227  *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID;
228  SubAuthority = RtlSubAuthoritySid(SeAliasUsersSid, 1);
229  *SubAuthority = DOMAIN_ALIAS_RID_USERS;
230  SubAuthority = RtlSubAuthoritySid(SeAliasGuestsSid, 0);
231  *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID;
232  SubAuthority = RtlSubAuthoritySid(SeAliasGuestsSid, 1);
233  *SubAuthority = DOMAIN_ALIAS_RID_GUESTS;
234  SubAuthority = RtlSubAuthoritySid(SeAliasPowerUsersSid, 0);
235  *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID;
236  SubAuthority = RtlSubAuthoritySid(SeAliasPowerUsersSid, 1);
237  *SubAuthority = DOMAIN_ALIAS_RID_POWER_USERS;
238  SubAuthority = RtlSubAuthoritySid(SeAliasAccountOpsSid, 0);
239  *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID;
240  SubAuthority = RtlSubAuthoritySid(SeAliasAccountOpsSid, 1);
241  *SubAuthority = DOMAIN_ALIAS_RID_ACCOUNT_OPS;
242  SubAuthority = RtlSubAuthoritySid(SeAliasSystemOpsSid, 0);
243  *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID;
244  SubAuthority = RtlSubAuthoritySid(SeAliasSystemOpsSid, 1);
245  *SubAuthority = DOMAIN_ALIAS_RID_SYSTEM_OPS;
246  SubAuthority = RtlSubAuthoritySid(SeAliasPrintOpsSid, 0);
247  *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID;
248  SubAuthority = RtlSubAuthoritySid(SeAliasPrintOpsSid, 1);
249  *SubAuthority = DOMAIN_ALIAS_RID_PRINT_OPS;
250  SubAuthority = RtlSubAuthoritySid(SeAliasBackupOpsSid, 0);
251  *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID;
252  SubAuthority = RtlSubAuthoritySid(SeAliasBackupOpsSid, 1);
253  *SubAuthority = DOMAIN_ALIAS_RID_BACKUP_OPS;
254  SubAuthority = RtlSubAuthoritySid(SeAuthenticatedUsersSid, 0);
255  *SubAuthority = SECURITY_AUTHENTICATED_USER_RID;
256  SubAuthority = RtlSubAuthoritySid(SeRestrictedSid, 0);
257  *SubAuthority = SECURITY_RESTRICTED_CODE_RID;
258  SubAuthority = RtlSubAuthoritySid(SeAnonymousLogonSid, 0);
259  *SubAuthority = SECURITY_ANONYMOUS_LOGON_RID;
260  SubAuthority = RtlSubAuthoritySid(SeLocalServiceSid, 0);
261  *SubAuthority = SECURITY_LOCAL_SERVICE_RID;
262  SubAuthority = RtlSubAuthoritySid(SeNetworkServiceSid, 0);
263  *SubAuthority = SECURITY_NETWORK_SERVICE_RID;
264 
265  return TRUE;
266 }
267 
268 NTSTATUS
269 NTAPI
273  IN BOOLEAN CaptureIfKernel,
274  OUT PSID *CapturedSid)
275 {
276  ULONG SidSize = 0;
277  PISID NewSid, Sid = (PISID)InputSid;
278 
279  PAGED_CODE();
280 
281  if (AccessMode != KernelMode)
282  {
283  _SEH2_TRY
284  {
285  ProbeForRead(Sid, FIELD_OFFSET(SID, SubAuthority), sizeof(UCHAR));
287  ProbeForRead(Sid, SidSize, sizeof(UCHAR));
288  }
290  {
291  /* Return the exception code */
293  }
294  _SEH2_END;
295 
296  /* Allocate a SID and copy it */
298  if (!NewSid)
300 
301  _SEH2_TRY
302  {
303  RtlCopyMemory(NewSid, Sid, SidSize);
304 
305  *CapturedSid = NewSid;
306  }
308  {
309  /* Free the SID and return the exception code */
312  }
313  _SEH2_END;
314  }
315  else if (!CaptureIfKernel)
316  {
317  *CapturedSid = InputSid;
318  }
319  else
320  {
322 
323  /* Allocate a SID and copy it */
325  if (NewSid == NULL)
327 
328  RtlCopyMemory(NewSid, Sid, SidSize);
329 
330  *CapturedSid = NewSid;
331  }
332 
333  return STATUS_SUCCESS;
334 }
335 
336 VOID
337 NTAPI
338 SepReleaseSid(IN PSID CapturedSid,
340  IN BOOLEAN CaptureIfKernel)
341 {
342  PAGED_CODE();
343 
344  if (CapturedSid != NULL &&
345  (AccessMode != KernelMode ||
346  (AccessMode == KernelMode && CaptureIfKernel)))
347  {
348  ExFreePoolWithTag(CapturedSid, TAG_SID);
349  }
350 }
351 
352 NTSTATUS
353 NTAPI
355  _In_ PSID_AND_ATTRIBUTES SrcSidAndAttributes,
356  _In_ ULONG AttributeCount,
358  _In_opt_ PVOID AllocatedMem,
359  _In_ ULONG AllocatedLength,
361  _In_ BOOLEAN CaptureIfKernel,
362  _Out_ PSID_AND_ATTRIBUTES *CapturedSidAndAttributes,
364 {
365  ULONG ArraySize, RequiredLength, SidLength, i;
366  PSID_AND_ATTRIBUTES SidAndAttributes;
367  PUCHAR CurrentDest;
368  PISID Sid;
370  PAGED_CODE();
371 
372  *CapturedSidAndAttributes = NULL;
373  *ResultLength = 0;
374 
375  if (AttributeCount == 0)
376  {
377  return STATUS_SUCCESS;
378  }
379 
380  if (AttributeCount > 0x1000)
381  {
383  }
384 
385  if ((PreviousMode == KernelMode) && !CaptureIfKernel)
386  {
387  *CapturedSidAndAttributes = SrcSidAndAttributes;
388  return STATUS_SUCCESS;
389  }
390 
391  ArraySize = AttributeCount * sizeof(SID_AND_ATTRIBUTES);
392  RequiredLength = ALIGN_UP_BY(ArraySize, sizeof(ULONG));
393 
394  /* Check for user mode data */
395  if (PreviousMode != KernelMode)
396  {
397  _SEH2_TRY
398  {
399  /* First probe the whole array */
400  ProbeForRead(SrcSidAndAttributes, ArraySize, sizeof(ULONG));
401 
402  /* Loop the array elements */
403  for (i = 0; i < AttributeCount; i++)
404  {
405  /* Get the SID and probe the minimal structure */
406  Sid = SrcSidAndAttributes[i].Sid;
407  ProbeForRead(Sid, sizeof(*Sid), sizeof(ULONG));
408 
409  /* Verify that the SID is valid */
410  if (((Sid->Revision & 0xF) != SID_REVISION) ||
412  {
414  }
415 
416  /* Calculate the SID length and probe the full SID */
418  ProbeForRead(Sid, SidLength, sizeof(ULONG));
419 
420  /* Add the aligned length to the required length */
421  RequiredLength += ALIGN_UP_BY(SidLength, sizeof(ULONG));
422  }
423  }
425  {
427  }
428  _SEH2_END;
429  }
430  else
431  {
432  /* Loop the array elements */
433  for (i = 0; i < AttributeCount; i++)
434  {
435  /* Get the SID and it's length */
436  Sid = SrcSidAndAttributes[i].Sid;
438 
439  /* Add the aligned length to the required length */
440  RequiredLength += ALIGN_UP_BY(SidLength, sizeof(ULONG));
441  }
442  }
443 
444  /* Assume success */
447 
448  /* Check if we have no buffer */
449  if (AllocatedMem == NULL)
450  {
451  /* Allocate a new buffer */
452  SidAndAttributes = ExAllocatePoolWithTag(PoolType,
455  if (SidAndAttributes == NULL)
456  {
458  }
459  }
460  /* Otherwise check if the buffer is large enough */
461  else if (AllocatedLength >= RequiredLength)
462  {
463  /* Buffer is large enough, use it */
464  SidAndAttributes = AllocatedMem;
465  }
466  else
467  {
468  /* Buffer is too small, fail */
470  }
471 
472  *CapturedSidAndAttributes = SidAndAttributes;
473 
474  /* Check again for user mode */
475  if (PreviousMode != KernelMode)
476  {
477  _SEH2_TRY
478  {
479  /* The rest of the data starts after the array */
480  CurrentDest = (PUCHAR)SidAndAttributes;
481  CurrentDest += ALIGN_UP_BY(ArraySize, sizeof(ULONG));
482 
483  /* Loop the array elements */
484  for (i = 0; i < AttributeCount; i++)
485  {
486  /* Get the SID and it's length */
487  Sid = SrcSidAndAttributes[i].Sid;
489 
490  /* Copy attributes */
491  SidAndAttributes[i].Attributes = SrcSidAndAttributes[i].Attributes;
492 
493  /* Copy the SID to the current destination address */
494  SidAndAttributes[i].Sid = (PSID)CurrentDest;
495  RtlCopyMemory(CurrentDest, SrcSidAndAttributes[i].Sid, SidLength);
496 
497  /* Sanity checks */
498  ASSERT(RtlLengthSid(SidAndAttributes[i].Sid) == SidLength);
499  ASSERT(RtlValidSid(SidAndAttributes[i].Sid));
500 
501  /* Update the current destination address */
502  CurrentDest += ALIGN_UP_BY(SidLength, sizeof(ULONG));
503  }
504  }
506  {
508  }
509  _SEH2_END;
510  }
511  else
512  {
513  /* The rest of the data starts after the array */
514  CurrentDest = (PUCHAR)SidAndAttributes;
515  CurrentDest += ALIGN_UP_BY(ArraySize, sizeof(ULONG));
516 
517  /* Loop the array elements */
518  for (i = 0; i < AttributeCount; i++)
519  {
520  /* Get the SID and it's length */
521  Sid = SrcSidAndAttributes[i].Sid;
523 
524  /* Copy attributes */
525  SidAndAttributes[i].Attributes = SrcSidAndAttributes[i].Attributes;
526 
527  /* Copy the SID to the current destination address */
528  SidAndAttributes[i].Sid = (PSID)CurrentDest;
529  RtlCopyMemory(CurrentDest, SrcSidAndAttributes[i].Sid, SidLength);
530 
531  /* Update the current destination address */
532  CurrentDest += ALIGN_UP_BY(SidLength, sizeof(ULONG));
533  }
534  }
535 
536  /* Check for failure */
537  if (!NT_SUCCESS(Status))
538  {
539  /* Check if we allocated a new array */
540  if (SidAndAttributes != AllocatedMem)
541  {
542  /* Free the array */
543  ExFreePoolWithTag(SidAndAttributes, TAG_SID_AND_ATTRIBUTES);
544  }
545 
546  /* Set returned address to NULL */
547  *CapturedSidAndAttributes = NULL ;
548  }
549 
550  return Status;
551 }
552 
553 VOID
554 NTAPI
556  _In_ _Post_invalid_ PSID_AND_ATTRIBUTES CapturedSidAndAttributes,
558  _In_ BOOLEAN CaptureIfKernel)
559 {
560  PAGED_CODE();
561 
562  if ((CapturedSidAndAttributes != NULL) &&
563  ((AccessMode != KernelMode) || CaptureIfKernel))
564  {
565  ExFreePoolWithTag(CapturedSidAndAttributes, TAG_SID_AND_ATTRIBUTES);
566  }
567 }
568 
569 
570 /* EOF */
PSID SeLocalServiceSid
Definition: sid.c:54
#define SECURITY_BATCH_RID
Definition: setypes.h:530
#define IN
Definition: typedefs.h:39
#define SECURITY_AUTHENTICATED_USER_RID
Definition: setypes.h:540
#define SECURITY_LOCAL_SYSTEM_RID
Definition: setypes.h:546
#define DOMAIN_ALIAS_RID_GUESTS
Definition: setypes.h:626
PSID SeAliasPrintOpsSid
Definition: sid.c:49
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define _Post_invalid_
Definition: no_sal2.h:524
VOID NTAPI FreeInitializedSids(VOID)
Definition: sid.c:61
PSID SeAnonymousLogonSid
Definition: sid.c:53
PSID SeBatchSid
Definition: sid.c:36
#define TRUE
Definition: types.h:120
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
PSID SeLocalSystemSid
Definition: sid.c:40
PSID SeAliasAdminsSid
Definition: sid.c:43
#define DOMAIN_ALIAS_RID_ACCOUNT_OPS
Definition: setypes.h:629
PSID SeDialupSid
Definition: sid.c:34
#define SECURITY_DIALUP_RID
Definition: setypes.h:528
unsigned char * PUCHAR
Definition: retypes.h:3
#define SID_REVISION
Definition: setypes.h:453
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI SeReleaseSidAndAttributesArray(_In_ _Post_invalid_ PSID_AND_ATTRIBUTES CapturedSidAndAttributes, _In_ KPROCESSOR_MODE AccessMode, _In_ BOOLEAN CaptureIfKernel)
Definition: sid.c:555
#define SECURITY_NETWORK_RID
Definition: setypes.h:529
#define TAG_SID
Definition: sid.c:15
#define DOMAIN_ALIAS_RID_POWER_USERS
Definition: setypes.h:627
#define SECURITY_INTERACTIVE_RID
Definition: setypes.h:531
#define SECURITY_NULL_SID_AUTHORITY
Definition: setypes.h:496
PSID SeAliasBackupOpsSid
Definition: sid.c:50
#define _In_opt_
Definition: no_sal2.h:212
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
_SEH2_TRY
Definition: create.c:4226
PSID SePrincipalSelfSid
Definition: sid.c:39
PULONG NTAPI RtlSubAuthoritySid(IN PSID Sid_, IN ULONG SubAuthority)
Definition: sid.c:89
NTSTATUS NTAPI SepCaptureSid(IN PSID InputSid, IN KPROCESSOR_MODE AccessMode, IN POOL_TYPE PoolType, IN BOOLEAN CaptureIfKernel, OUT PSID *CapturedSid)
Definition: sid.c:270
#define SECURITY_PRINCIPAL_SELF_RID
Definition: setypes.h:539
PSID SeCreatorOwnerServerSid
Definition: sid.c:31
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define FALSE
Definition: types.h:117
SID_IDENTIFIER_AUTHORITY SeCreatorSidAuthority
Definition: sid.c:23
#define SECURITY_LOCAL_SID_AUTHORITY
Definition: setypes.h:502
struct _SID * PISID
BOOLEAN NTAPI SepInitSecurityIDs(VOID)
Definition: sid.c:96
_In_ PEPROCESS _In_ KPROCESSOR_MODE AccessMode
Definition: mmfuncs.h:395
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
unsigned char BOOLEAN
#define SID_MAX_SUB_AUTHORITIES
Definition: setypes.h:454
ULONG NTAPI RtlLengthSid(IN PSID Sid_)
Definition: sid.c:150
#define _Out_
Definition: no_sal2.h:160
_In_ ULONG _In_ ACCESS_MASK _In_ PSID Sid
Definition: rtlfuncs.h:1103
#define STATUS_INVALID_SID
Definition: ntstatus.h:356
#define SECURITY_LOCAL_SERVICE_RID
Definition: setypes.h:547
VOID NTAPI SepReleaseSid(IN PSID CapturedSid, IN KPROCESSOR_MODE AccessMode, IN BOOLEAN CaptureIfKernel)
Definition: sid.c:338
#define SECURITY_NT_AUTHORITY
Definition: setypes.h:526
BOOLEAN NTAPI RtlValidSid(IN PSID Sid_)
Definition: sid.c:21
Status
Definition: gdiplustypes.h:24
#define TAG_SID_AND_ATTRIBUTES
Definition: sid.c:16
_In_ KPROCESSOR_MODE PreviousMode
Definition: sefuncs.h:103
#define SECURITY_CREATOR_GROUP_SERVER_RID
Definition: setypes.h:520
#define SECURITY_BUILTIN_DOMAIN_RID
Definition: setypes.h:553
#define _SEH2_YIELD(STMT_)
Definition: pseh2_64.h:8
#define ASSERT(a)
Definition: mode.c:45
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define DOMAIN_ALIAS_RID_BACKUP_OPS
Definition: setypes.h:632
#define SECURITY_WORLD_SID_AUTHORITY
Definition: setypes.h:499
INT POOL_TYPE
Definition: typedefs.h:78
PSID SeServiceSid
Definition: sid.c:38
struct _SID_AND_ATTRIBUTES SID_AND_ATTRIBUTES
#define DOMAIN_ALIAS_RID_SYSTEM_OPS
Definition: setypes.h:630
#define SECURITY_LOCAL_RID
Definition: setypes.h:514
SID_IDENTIFIER_AUTHORITY SeWorldSidAuthority
Definition: sid.c:21
CODE_SEG("INIT")
Definition: fsrtlpc.c:19
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
#define SECURITY_WORLD_RID
Definition: setypes.h:513
NTSTATUS NTAPI SeCaptureSidAndAttributesArray(_In_ PSID_AND_ATTRIBUTES SrcSidAndAttributes, _In_ ULONG AttributeCount, _In_ KPROCESSOR_MODE PreviousMode, _In_opt_ PVOID AllocatedMem, _In_ ULONG AllocatedLength, _In_ POOL_TYPE PoolType, _In_ BOOLEAN CaptureIfKernel, _Out_ PSID_AND_ATTRIBUTES *CapturedSidAndAttributes, _Out_ PULONG ResultLength)
Definition: sid.c:354
#define SECURITY_ANONYMOUS_LOGON_RID
Definition: setypes.h:535
PSID SeAliasUsersSid
Definition: sid.c:44
PSID SeAliasGuestsSid
Definition: sid.c:45
struct _SID * PSID
Definition: eventlog.c:35
#define SECURITY_CREATOR_OWNER_RID
Definition: setypes.h:517
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define SECURITY_NULL_RID
Definition: setypes.h:512
unsigned char UCHAR
Definition: xmlstorage.h:181
PSID SeAuthenticatedUserSid
Definition: sid.c:41
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:102
PSID SeWorldSid
Definition: sid.c:27
ULONG NTAPI RtlLengthRequiredSid(IN ULONG SubAuthorityCount)
Definition: sid.c:54
PSID SeLocalSid
Definition: sid.c:28
PSID SeAuthenticatedUsersSid
Definition: sid.c:51
PSID SeAliasPowerUsersSid
Definition: sid.c:46
#define SECURITY_NETWORK_SERVICE_RID
Definition: setypes.h:548
#define _In_
Definition: no_sal2.h:158
PSID SeNetworkSid
Definition: sid.c:35
SID_IDENTIFIER_AUTHORITY SeNullSidAuthority
Definition: sid.c:20
#define SECURITY_CREATOR_GROUP_RID
Definition: setypes.h:518
_SEH2_END
Definition: create.c:4400
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
NTSTATUS NTAPI RtlInitializeSid(IN PSID Sid_, IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, IN UCHAR SubAuthorityCount)
Definition: sid.c:68
#define DOMAIN_ALIAS_RID_USERS
Definition: setypes.h:625
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
_In_ ULONG _Out_opt_ PULONG RequiredLength
Definition: wmifuncs.h:29
BYTE SubAuthorityCount
Definition: ms-dtyp.idl:200
unsigned int * PULONG
Definition: retypes.h:1
#define SECURITY_RESTRICTED_CODE_RID
Definition: setypes.h:541
#define NULL
Definition: types.h:112
PSID SeCreatorGroupSid
Definition: sid.c:30
PSID SeRestrictedSid
Definition: sid.c:52
PSID SeCreatorGroupServerSid
Definition: sid.c:32
PSID SeNetworkServiceSid
Definition: sid.c:55
#define SECURITY_CREATOR_OWNER_SERVER_RID
Definition: setypes.h:519
PSID SeRestrictedCodeSid
Definition: sid.c:42
#define DOMAIN_ALIAS_RID_PRINT_OPS
Definition: setypes.h:631
#define OUT
Definition: typedefs.h:40
#define SECURITY_SERVICE_RID
Definition: setypes.h:534
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3810
unsigned int ULONG
Definition: retypes.h:1
#define ALIGN_UP_BY(size, align)
SID_IDENTIFIER_AUTHORITY SeLocalSidAuthority
Definition: sid.c:22
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
BYTE Revision
Definition: ms-dtyp.idl:199
PSID SeCreatorOwnerSid
Definition: sid.c:29
PSID SeAliasSystemOpsSid
Definition: sid.c:48
#define STATUS_SUCCESS
Definition: shellext.h:65
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:12
PSID SeInteractiveSid
Definition: sid.c:37
PSID SeNullSid
Definition: sid.c:26
SID_IDENTIFIER_AUTHORITY SeNtSidAuthority
Definition: sid.c:24
_In_ PSID _In_ PSID NewSid
Definition: rtlfuncs.h:2815
#define DOMAIN_ALIAS_RID_ADMINS
Definition: setypes.h:624
#define SECURITY_CREATOR_SID_AUTHORITY
Definition: setypes.h:505
PSID SeNtAuthoritySid
Definition: sid.c:33
#define PAGED_CODE()
PSID SeAliasAccountOpsSid
Definition: sid.c:47