ReactOS  0.4.15-dev-2993-g14fbe80
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 /* GLOBALS ********************************************************************/
17 
23 
54 
55 /* FUNCTIONS ******************************************************************/
56 
57 VOID
58 NTAPI
60 {
89 }
90 
91 CODE_SEG("INIT")
92 BOOLEAN
93 NTAPI
95 {
96  ULONG SidLength0;
97  ULONG SidLength1;
98  ULONG SidLength2;
99  PULONG SubAuthority;
100 
101  SidLength0 = RtlLengthRequiredSid(0);
102  SidLength1 = RtlLengthRequiredSid(1);
103  SidLength2 = RtlLengthRequiredSid(2);
104 
105  /* create NullSid */
136 
137  if (SeNullSid == NULL || SeWorldSid == NULL ||
141  SeDialupSid == NULL || SeNetworkSid == NULL || SeBatchSid == NULL ||
152  {
154  return FALSE;
155  }
156 
187 
188  SubAuthority = RtlSubAuthoritySid(SeNullSid, 0);
189  *SubAuthority = SECURITY_NULL_RID;
190  SubAuthority = RtlSubAuthoritySid(SeWorldSid, 0);
191  *SubAuthority = SECURITY_WORLD_RID;
192  SubAuthority = RtlSubAuthoritySid(SeLocalSid, 0);
193  *SubAuthority = SECURITY_LOCAL_RID;
194  SubAuthority = RtlSubAuthoritySid(SeCreatorOwnerSid, 0);
195  *SubAuthority = SECURITY_CREATOR_OWNER_RID;
196  SubAuthority = RtlSubAuthoritySid(SeCreatorGroupSid, 0);
197  *SubAuthority = SECURITY_CREATOR_GROUP_RID;
198  SubAuthority = RtlSubAuthoritySid(SeCreatorOwnerServerSid, 0);
199  *SubAuthority = SECURITY_CREATOR_OWNER_SERVER_RID;
200  SubAuthority = RtlSubAuthoritySid(SeCreatorGroupServerSid, 0);
201  *SubAuthority = SECURITY_CREATOR_GROUP_SERVER_RID;
202  SubAuthority = RtlSubAuthoritySid(SeDialupSid, 0);
203  *SubAuthority = SECURITY_DIALUP_RID;
204  SubAuthority = RtlSubAuthoritySid(SeNetworkSid, 0);
205  *SubAuthority = SECURITY_NETWORK_RID;
206  SubAuthority = RtlSubAuthoritySid(SeBatchSid, 0);
207  *SubAuthority = SECURITY_BATCH_RID;
208  SubAuthority = RtlSubAuthoritySid(SeInteractiveSid, 0);
209  *SubAuthority = SECURITY_INTERACTIVE_RID;
210  SubAuthority = RtlSubAuthoritySid(SeServiceSid, 0);
211  *SubAuthority = SECURITY_SERVICE_RID;
212  SubAuthority = RtlSubAuthoritySid(SePrincipalSelfSid, 0);
213  *SubAuthority = SECURITY_PRINCIPAL_SELF_RID;
214  SubAuthority = RtlSubAuthoritySid(SeLocalSystemSid, 0);
215  *SubAuthority = SECURITY_LOCAL_SYSTEM_RID;
216  SubAuthority = RtlSubAuthoritySid(SeAuthenticatedUserSid, 0);
217  *SubAuthority = SECURITY_AUTHENTICATED_USER_RID;
218  SubAuthority = RtlSubAuthoritySid(SeRestrictedCodeSid, 0);
219  *SubAuthority = SECURITY_RESTRICTED_CODE_RID;
220  SubAuthority = RtlSubAuthoritySid(SeAliasAdminsSid, 0);
221  *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID;
222  SubAuthority = RtlSubAuthoritySid(SeAliasAdminsSid, 1);
223  *SubAuthority = DOMAIN_ALIAS_RID_ADMINS;
224  SubAuthority = RtlSubAuthoritySid(SeAliasUsersSid, 0);
225  *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID;
226  SubAuthority = RtlSubAuthoritySid(SeAliasUsersSid, 1);
227  *SubAuthority = DOMAIN_ALIAS_RID_USERS;
228  SubAuthority = RtlSubAuthoritySid(SeAliasGuestsSid, 0);
229  *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID;
230  SubAuthority = RtlSubAuthoritySid(SeAliasGuestsSid, 1);
231  *SubAuthority = DOMAIN_ALIAS_RID_GUESTS;
232  SubAuthority = RtlSubAuthoritySid(SeAliasPowerUsersSid, 0);
233  *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID;
234  SubAuthority = RtlSubAuthoritySid(SeAliasPowerUsersSid, 1);
235  *SubAuthority = DOMAIN_ALIAS_RID_POWER_USERS;
236  SubAuthority = RtlSubAuthoritySid(SeAliasAccountOpsSid, 0);
237  *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID;
238  SubAuthority = RtlSubAuthoritySid(SeAliasAccountOpsSid, 1);
239  *SubAuthority = DOMAIN_ALIAS_RID_ACCOUNT_OPS;
240  SubAuthority = RtlSubAuthoritySid(SeAliasSystemOpsSid, 0);
241  *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID;
242  SubAuthority = RtlSubAuthoritySid(SeAliasSystemOpsSid, 1);
243  *SubAuthority = DOMAIN_ALIAS_RID_SYSTEM_OPS;
244  SubAuthority = RtlSubAuthoritySid(SeAliasPrintOpsSid, 0);
245  *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID;
246  SubAuthority = RtlSubAuthoritySid(SeAliasPrintOpsSid, 1);
247  *SubAuthority = DOMAIN_ALIAS_RID_PRINT_OPS;
248  SubAuthority = RtlSubAuthoritySid(SeAliasBackupOpsSid, 0);
249  *SubAuthority = SECURITY_BUILTIN_DOMAIN_RID;
250  SubAuthority = RtlSubAuthoritySid(SeAliasBackupOpsSid, 1);
251  *SubAuthority = DOMAIN_ALIAS_RID_BACKUP_OPS;
252  SubAuthority = RtlSubAuthoritySid(SeAuthenticatedUsersSid, 0);
253  *SubAuthority = SECURITY_AUTHENTICATED_USER_RID;
254  SubAuthority = RtlSubAuthoritySid(SeRestrictedSid, 0);
255  *SubAuthority = SECURITY_RESTRICTED_CODE_RID;
256  SubAuthority = RtlSubAuthoritySid(SeAnonymousLogonSid, 0);
257  *SubAuthority = SECURITY_ANONYMOUS_LOGON_RID;
258  SubAuthority = RtlSubAuthoritySid(SeLocalServiceSid, 0);
259  *SubAuthority = SECURITY_LOCAL_SERVICE_RID;
260  SubAuthority = RtlSubAuthoritySid(SeNetworkServiceSid, 0);
261  *SubAuthority = SECURITY_NETWORK_SERVICE_RID;
262 
263  return TRUE;
264 }
265 
266 NTSTATUS
267 NTAPI
271  IN BOOLEAN CaptureIfKernel,
272  OUT PSID *CapturedSid)
273 {
274  ULONG SidSize = 0;
275  PISID NewSid, Sid = (PISID)InputSid;
276 
277  PAGED_CODE();
278 
279  if (AccessMode != KernelMode)
280  {
281  _SEH2_TRY
282  {
283  ProbeForRead(Sid, FIELD_OFFSET(SID, SubAuthority), sizeof(UCHAR));
285  ProbeForRead(Sid, SidSize, sizeof(UCHAR));
286  }
288  {
289  /* Return the exception code */
291  }
292  _SEH2_END;
293 
294  /* Allocate a SID and copy it */
296  if (!NewSid)
298 
299  _SEH2_TRY
300  {
301  RtlCopyMemory(NewSid, Sid, SidSize);
302 
303  *CapturedSid = NewSid;
304  }
306  {
307  /* Free the SID and return the exception code */
310  }
311  _SEH2_END;
312  }
313  else if (!CaptureIfKernel)
314  {
315  *CapturedSid = InputSid;
316  }
317  else
318  {
320 
321  /* Allocate a SID and copy it */
323  if (NewSid == NULL)
325 
326  RtlCopyMemory(NewSid, Sid, SidSize);
327 
328  *CapturedSid = NewSid;
329  }
330 
331  return STATUS_SUCCESS;
332 }
333 
334 VOID
335 NTAPI
336 SepReleaseSid(IN PSID CapturedSid,
338  IN BOOLEAN CaptureIfKernel)
339 {
340  PAGED_CODE();
341 
342  if (CapturedSid != NULL &&
343  (AccessMode != KernelMode ||
344  (AccessMode == KernelMode && CaptureIfKernel)))
345  {
346  ExFreePoolWithTag(CapturedSid, TAG_SID);
347  }
348 }
349 
350 NTSTATUS
351 NTAPI
353  _In_ PSID_AND_ATTRIBUTES SrcSidAndAttributes,
354  _In_ ULONG AttributeCount,
356  _In_opt_ PVOID AllocatedMem,
357  _In_ ULONG AllocatedLength,
359  _In_ BOOLEAN CaptureIfKernel,
360  _Out_ PSID_AND_ATTRIBUTES *CapturedSidAndAttributes,
362 {
363  ULONG ArraySize, RequiredLength, SidLength, i;
364  PSID_AND_ATTRIBUTES SidAndAttributes;
365  PUCHAR CurrentDest;
366  PISID Sid;
368  PAGED_CODE();
369 
370  *CapturedSidAndAttributes = NULL;
371  *ResultLength = 0;
372 
373  if (AttributeCount == 0)
374  {
375  return STATUS_SUCCESS;
376  }
377 
378  if (AttributeCount > 0x1000)
379  {
381  }
382 
383  if ((PreviousMode == KernelMode) && !CaptureIfKernel)
384  {
385  *CapturedSidAndAttributes = SrcSidAndAttributes;
386  return STATUS_SUCCESS;
387  }
388 
389  ArraySize = AttributeCount * sizeof(SID_AND_ATTRIBUTES);
390  RequiredLength = ALIGN_UP_BY(ArraySize, sizeof(ULONG));
391 
392  /* Check for user mode data */
393  if (PreviousMode != KernelMode)
394  {
395  _SEH2_TRY
396  {
397  /* First probe the whole array */
398  ProbeForRead(SrcSidAndAttributes, ArraySize, sizeof(ULONG));
399 
400  /* Loop the array elements */
401  for (i = 0; i < AttributeCount; i++)
402  {
403  /* Get the SID and probe the minimal structure */
404  Sid = SrcSidAndAttributes[i].Sid;
405  ProbeForRead(Sid, sizeof(*Sid), sizeof(ULONG));
406 
407  /* Verify that the SID is valid */
408  if (((Sid->Revision & 0xF) != SID_REVISION) ||
410  {
412  }
413 
414  /* Calculate the SID length and probe the full SID */
416  ProbeForRead(Sid, SidLength, sizeof(ULONG));
417 
418  /* Add the aligned length to the required length */
419  RequiredLength += ALIGN_UP_BY(SidLength, sizeof(ULONG));
420  }
421  }
423  {
425  }
426  _SEH2_END;
427  }
428  else
429  {
430  /* Loop the array elements */
431  for (i = 0; i < AttributeCount; i++)
432  {
433  /* Get the SID and it's length */
434  Sid = SrcSidAndAttributes[i].Sid;
436 
437  /* Add the aligned length to the required length */
438  RequiredLength += ALIGN_UP_BY(SidLength, sizeof(ULONG));
439  }
440  }
441 
442  /* Assume success */
445 
446  /* Check if we have no buffer */
447  if (AllocatedMem == NULL)
448  {
449  /* Allocate a new buffer */
450  SidAndAttributes = ExAllocatePoolWithTag(PoolType,
453  if (SidAndAttributes == NULL)
454  {
456  }
457  }
458  /* Otherwise check if the buffer is large enough */
459  else if (AllocatedLength >= RequiredLength)
460  {
461  /* Buffer is large enough, use it */
462  SidAndAttributes = AllocatedMem;
463  }
464  else
465  {
466  /* Buffer is too small, fail */
468  }
469 
470  *CapturedSidAndAttributes = SidAndAttributes;
471 
472  /* Check again for user mode */
473  if (PreviousMode != KernelMode)
474  {
475  _SEH2_TRY
476  {
477  /* The rest of the data starts after the array */
478  CurrentDest = (PUCHAR)SidAndAttributes;
479  CurrentDest += ALIGN_UP_BY(ArraySize, sizeof(ULONG));
480 
481  /* Loop the array elements */
482  for (i = 0; i < AttributeCount; i++)
483  {
484  /* Get the SID and it's length */
485  Sid = SrcSidAndAttributes[i].Sid;
487 
488  /* Copy attributes */
489  SidAndAttributes[i].Attributes = SrcSidAndAttributes[i].Attributes;
490 
491  /* Copy the SID to the current destination address */
492  SidAndAttributes[i].Sid = (PSID)CurrentDest;
493  RtlCopyMemory(CurrentDest, SrcSidAndAttributes[i].Sid, SidLength);
494 
495  /* Sanity checks */
496  ASSERT(RtlLengthSid(SidAndAttributes[i].Sid) == SidLength);
497  ASSERT(RtlValidSid(SidAndAttributes[i].Sid));
498 
499  /* Update the current destination address */
500  CurrentDest += ALIGN_UP_BY(SidLength, sizeof(ULONG));
501  }
502  }
504  {
506  }
507  _SEH2_END;
508  }
509  else
510  {
511  /* The rest of the data starts after the array */
512  CurrentDest = (PUCHAR)SidAndAttributes;
513  CurrentDest += ALIGN_UP_BY(ArraySize, sizeof(ULONG));
514 
515  /* Loop the array elements */
516  for (i = 0; i < AttributeCount; i++)
517  {
518  /* Get the SID and it's length */
519  Sid = SrcSidAndAttributes[i].Sid;
521 
522  /* Copy attributes */
523  SidAndAttributes[i].Attributes = SrcSidAndAttributes[i].Attributes;
524 
525  /* Copy the SID to the current destination address */
526  SidAndAttributes[i].Sid = (PSID)CurrentDest;
527  RtlCopyMemory(CurrentDest, SrcSidAndAttributes[i].Sid, SidLength);
528 
529  /* Update the current destination address */
530  CurrentDest += ALIGN_UP_BY(SidLength, sizeof(ULONG));
531  }
532  }
533 
534  /* Check for failure */
535  if (!NT_SUCCESS(Status))
536  {
537  /* Check if we allocated a new array */
538  if (SidAndAttributes != AllocatedMem)
539  {
540  /* Free the array */
541  ExFreePoolWithTag(SidAndAttributes, TAG_SID_AND_ATTRIBUTES);
542  }
543 
544  /* Set returned address to NULL */
545  *CapturedSidAndAttributes = NULL ;
546  }
547 
548  return Status;
549 }
550 
551 VOID
552 NTAPI
554  _In_ _Post_invalid_ PSID_AND_ATTRIBUTES CapturedSidAndAttributes,
556  _In_ BOOLEAN CaptureIfKernel)
557 {
558  PAGED_CODE();
559 
560  if ((CapturedSidAndAttributes != NULL) &&
561  ((AccessMode != KernelMode) || CaptureIfKernel))
562  {
563  ExFreePoolWithTag(CapturedSidAndAttributes, TAG_SID_AND_ATTRIBUTES);
564  }
565 }
566 
567 
568 /* EOF */
PSID SeLocalServiceSid
Definition: sid.c:52
#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 TAG_SID_AND_ATTRIBUTES
Definition: tag.h:188
#define DOMAIN_ALIAS_RID_GUESTS
Definition: setypes.h:626
PSID SeAliasPrintOpsSid
Definition: sid.c:47
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define _In_opt_
Definition: ms_sal.h:309
VOID NTAPI FreeInitializedSids(VOID)
Definition: sid.c:59
PSID SeAnonymousLogonSid
Definition: sid.c:51
#define _Out_
Definition: ms_sal.h:345
PSID SeBatchSid
Definition: sid.c:34
#define TRUE
Definition: types.h:120
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
PSID SeLocalSystemSid
Definition: sid.c:38
PSID SeAliasAdminsSid
Definition: sid.c:41
#define DOMAIN_ALIAS_RID_ACCOUNT_OPS
Definition: setypes.h:629
PSID SeDialupSid
Definition: sid.c:32
#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:553
#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:48
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
_SEH2_TRY
Definition: create.c:4226
PSID SePrincipalSelfSid
Definition: sid.c:37
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:268
#define SECURITY_PRINCIPAL_SELF_RID
Definition: setypes.h:539
PSID SeCreatorOwnerServerSid
Definition: sid.c:29
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:21
#define SECURITY_LOCAL_SID_AUTHORITY
Definition: setypes.h:502
struct _SID * PISID
BOOLEAN NTAPI SepInitSecurityIDs(VOID)
Definition: sid.c:94
_In_ PEPROCESS _In_ KPROCESSOR_MODE AccessMode
Definition: mmfuncs.h:395
unsigned char BOOLEAN
#define SID_MAX_SUB_AUTHORITIES
Definition: setypes.h:454
ULONG NTAPI RtlLengthSid(IN PSID Sid_)
Definition: sid.c:150
#define _In_
Definition: ms_sal.h:308
_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:336
#define SECURITY_NT_AUTHORITY
Definition: setypes.h:526
BOOLEAN NTAPI RtlValidSid(IN PSID Sid_)
Definition: sid.c:21
Status
Definition: gdiplustypes.h:24
_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 ASSERT(a)
Definition: mode.c:44
#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:36
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
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: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:352
#define SECURITY_ANONYMOUS_LOGON_RID
Definition: setypes.h:535
PSID SeAliasUsersSid
Definition: sid.c:42
PSID SeAliasGuestsSid
Definition: sid.c:43
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:39
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:102
PSID SeWorldSid
Definition: sid.c:25
ULONG NTAPI RtlLengthRequiredSid(IN ULONG SubAuthorityCount)
Definition: sid.c:54
PSID SeLocalSid
Definition: sid.c:26
PSID SeAuthenticatedUsersSid
Definition: sid.c:49
PSID SeAliasPowerUsersSid
Definition: sid.c:44
#define _Post_invalid_
Definition: ms_sal.h:695
#define SECURITY_NETWORK_SERVICE_RID
Definition: setypes.h:548
PSID SeNetworkSid
Definition: sid.c:33
SID_IDENTIFIER_AUTHORITY SeNullSidAuthority
Definition: sid.c:18
#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:28
PSID SeRestrictedSid
Definition: sid.c:50
PSID SeCreatorGroupServerSid
Definition: sid.c:30
PSID SeNetworkServiceSid
Definition: sid.c:53
#define SECURITY_CREATOR_OWNER_SERVER_RID
Definition: setypes.h:519
PSID SeRestrictedCodeSid
Definition: sid.c:40
#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:20
#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:40
BYTE Revision
Definition: ms-dtyp.idl:199
PSID SeCreatorOwnerSid
Definition: sid.c:27
PSID SeAliasSystemOpsSid
Definition: sid.c:46
#define STATUS_SUCCESS
Definition: shellext.h:65
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:165
PSID SeInteractiveSid
Definition: sid.c:35
#define _SEH2_YIELD(__stmt)
Definition: pseh2_64.h:168
PSID SeNullSid
Definition: sid.c:24
SID_IDENTIFIER_AUTHORITY SeNtSidAuthority
Definition: sid.c:22
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099
_In_ PSID _In_ PSID NewSid
Definition: rtlfuncs.h:2813
#define DOMAIN_ALIAS_RID_ADMINS
Definition: setypes.h:624
static CODE_SEG("PAGE")
Definition: isapnp.c:1482
#define SECURITY_CREATOR_SID_AUTHORITY
Definition: setypes.h:505
PSID SeNtAuthoritySid
Definition: sid.c:31
#define PAGED_CODE()
PSID SeAliasAccountOpsSid
Definition: sid.c:45