ReactOS 0.4.15-dev-5896-g3f5bcf5
se.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Internal header for the Security Manager
5 * COPYRIGHT: Copyright Eric Kohl
6 * Copyright 2022 George Bișoc <george.bisoc@reactos.org>
7 */
8
9#pragma once
10
11//
12// Internal ACE type structures
13//
14typedef struct _KNOWN_ACE
15{
20
21typedef struct _KNOWN_OBJECT_ACE
22{
28
29typedef struct _KNOWN_COMPOUND_ACE
30{
37
38//
39// Access Check Rights
40//
42{
47
49{
53
54//
55// Token Audit Policy Information structure
56//
58{
60 struct
61 {
66
67//
68// Token creation method defines (for debugging purposes)
69//
70#define TOKEN_CREATE_METHOD 0xCUL
71#define TOKEN_DUPLICATE_METHOD 0xDUL
72#define TOKEN_FILTER_METHOD 0xFUL
73
74//
75// Security descriptor internal helpers
76//
78PSID
80 _Inout_ PVOID _Descriptor)
81{
84
85 if (Descriptor->Control & SE_SELF_RELATIVE)
86 {
88 if (!SdRel->Group) return NULL;
89 return (PSID)((ULONG_PTR)Descriptor + SdRel->Group);
90 }
91 else
92 {
93 return Descriptor->Group;
94 }
95}
96
98PSID
100 _Inout_ PVOID _Descriptor)
101{
104
105 if (Descriptor->Control & SE_SELF_RELATIVE)
106 {
108 if (!SdRel->Owner) return NULL;
109 return (PSID)((ULONG_PTR)Descriptor + SdRel->Owner);
110 }
111 else
112 {
113 return Descriptor->Owner;
114 }
115}
116
118PACL
120 _Inout_ PVOID _Descriptor)
121{
124
125 if (!(Descriptor->Control & SE_DACL_PRESENT)) return NULL;
126
127 if (Descriptor->Control & SE_SELF_RELATIVE)
128 {
130 if (!SdRel->Dacl) return NULL;
131 return (PACL)((ULONG_PTR)Descriptor + SdRel->Dacl);
132 }
133 else
134 {
135 return Descriptor->Dacl;
136 }
137}
138
140PACL
142 _Inout_ PVOID _Descriptor)
143{
146
147 if (!(Descriptor->Control & SE_SACL_PRESENT)) return NULL;
148
149 if (Descriptor->Control & SE_SELF_RELATIVE)
150 {
152 if (!SdRel->Sacl) return NULL;
153 return (PACL)((ULONG_PTR)Descriptor + SdRel->Sacl);
154 }
155 else
156 {
157 return Descriptor->Sacl;
158 }
159}
160
161#ifndef RTL_H
162
163//
164// SID Authorities
165//
171
172//
173// SIDs
174//
175extern PSID SeNullSid;
176extern PSID SeWorldSid;
177extern PSID SeLocalSid;
183extern PSID SeDialupSid;
184extern PSID SeNetworkSid;
185extern PSID SeBatchSid;
187extern PSID SeServiceSid;
194extern PSID SeAliasUsersSid;
202extern PSID SeRestrictedSid;
206
207//
208// Privileges
209//
210extern const LUID SeCreateTokenPrivilege;
212extern const LUID SeLockMemoryPrivilege;
213extern const LUID SeIncreaseQuotaPrivilege;
215extern const LUID SeTcbPrivilege;
216extern const LUID SeSecurityPrivilege;
217extern const LUID SeTakeOwnershipPrivilege;
218extern const LUID SeLoadDriverPrivilege;
219extern const LUID SeSystemProfilePrivilege;
220extern const LUID SeSystemtimePrivilege;
225extern const LUID SeBackupPrivilege;
226extern const LUID SeRestorePrivilege;
227extern const LUID SeShutdownPrivilege;
228extern const LUID SeDebugPrivilege;
229extern const LUID SeAuditPrivilege;
231extern const LUID SeChangeNotifyPrivilege;
233extern const LUID SeUndockPrivilege;
234extern const LUID SeSyncAgentPrivilege;
236extern const LUID SeManageVolumePrivilege;
237extern const LUID SeImpersonatePrivilege;
238extern const LUID SeCreateGlobalPrivilege;
240extern const LUID SeRelabelPrivilege;
242extern const LUID SeTimeZonePrivilege;
244
245//
246// DACLs
247//
253
254//
255// SDs
256//
264
265//
266// Anonymous Logon Tokens
267//
270
271
272//
273// Token lock management macros
274//
275#define SepAcquireTokenLockExclusive(Token) \
276{ \
277 KeEnterCriticalRegion(); \
278 ExAcquireResourceExclusiveLite(((PTOKEN)Token)->TokenLock, TRUE); \
279}
280#define SepAcquireTokenLockShared(Token) \
281{ \
282 KeEnterCriticalRegion(); \
283 ExAcquireResourceSharedLite(((PTOKEN)Token)->TokenLock, TRUE); \
284}
285
286#define SepReleaseTokenLock(Token) \
287{ \
288 ExReleaseResourceLite(((PTOKEN)Token)->TokenLock); \
289 KeLeaveCriticalRegion(); \
290}
291
292#if DBG
293//
294// Security Debug Utility Functions
295//
296VOID
299
300VOID
303
304VOID
306 _In_ PACCESS_CHECK_RIGHTS AccessRights);
307#endif // DBG
308
309//
310// Token Functions
311//
312CODE_SEG("INIT")
313VOID
314NTAPI
316
317CODE_SEG("INIT")
318PTOKEN
319NTAPI
321
322CODE_SEG("INIT")
323PTOKEN
325
326CODE_SEG("INIT")
327PTOKEN
329
331NTAPI
339 _Out_ PTOKEN* NewAccessToken);
340
342NTAPI
350 _In_ PLUID AuthenticationId,
351 _In_ PLARGE_INTEGER ExpirationTime,
353 _In_ ULONG GroupCount,
355 _In_ ULONG GroupsLength,
356 _In_ ULONG PrivilegeCount,
360 _In_opt_ PACL DefaultDacl,
362 _In_ BOOLEAN SystemToken);
363
365NTAPI
367 _In_ PACCESS_TOKEN _Token,
369 _In_ BOOLEAN TokenLocked);
370
374
375VOID
378
379VOID
382
387 _In_opt_ PSID DefaultOwner,
388 _Out_opt_ PULONG PrimaryGroupIndex,
389 _Out_opt_ PULONG DefaultOwnerIndex);
390
391VOID
395
396VOID
399
400VOID
404
405VOID
409
410ULONG
412 _In_ ULONG DynamicCharged,
414 _In_opt_ PACL DefaultDacl);
415
419 _In_ ULONG NewDynamicPartSize);
420
422NTAPI
424 _In_ PTOKEN ProcessToken,
425 _In_ PTOKEN TokenToImpersonate,
427
428VOID
429NTAPI
431 _In_ PACCESS_TOKEN _Token,
432 _Out_ PTOKEN_CONTROL TokenControl);
433
434VOID
435NTAPI
438
440NTAPI
444 _In_ BOOLEAN InUse,
446
448NTAPI
452
454NTAPI
457 _Out_ PBOOLEAN IsSibling);
458
460NTAPI
463 _In_ PACCESS_TOKEN NewAccessToken,
464 _Out_ PACCESS_TOKEN* OldAccessToken);
465
467NTAPI
472 _Out_ PACCESS_TOKEN* NewToken);
473
475NTAPI
478
479ULONG
483
484//
485// Security Manager (SeMgr) functions
486//
487CODE_SEG("INIT")
489NTAPI
491
493NTAPI
496 _In_ SECURITY_OPERATION_CODE OperationType,
500 _Inout_opt_ PSECURITY_DESCRIPTOR *OldSecurityDescriptor,
503
504VOID
505NTAPI
509
510VOID
511NTAPI
515
516//
517// Privilege functions
518//
519CODE_SEG("INIT")
520VOID
521NTAPI
523
525NTAPI
529 _In_ ULONG PrivilegeCount,
530 _In_ ULONG PrivilegeControl,
532
534NTAPI
540 _Out_opt_ PPRIVILEGE_SET *OutPrivilegeSet,
542
544NTAPI
548
550NTAPI
552 _In_ LUID PrivilegeValue,
553 _In_ HANDLE ObjectHandle,
556
558NTAPI
561 _In_ ULONG PrivilegeCount,
563 _In_ PLUID_AND_ATTRIBUTES AllocatedMem,
564 _In_ ULONG AllocatedLength,
566 _In_ BOOLEAN CaptureIfKernel,
569
570VOID
571NTAPI
575 _In_ BOOLEAN CaptureIfKernel);
576
577//
578// SID functions
579//
580CODE_SEG("INIT")
582NTAPI
584
586NTAPI
588 _In_ PSID InputSid,
591 _In_ BOOLEAN CaptureIfKernel,
592 _Out_ PSID *CapturedSid);
593
594VOID
595NTAPI
597 _In_ PSID CapturedSid,
599 _In_ BOOLEAN CaptureIfKernel);
600
602NTAPI
604 _In_ PACCESS_TOKEN _Token,
605 _In_ PSID Sid);
606
608NTAPI
610 _In_ PACCESS_TOKEN _Token,
611 _In_ PSID PrincipalSelfSid,
612 _In_ PSID _Sid,
613 _In_ BOOLEAN Deny,
615
616PSID
617NTAPI
620 _In_ PACE Ace);
621
623NTAPI
625 _In_ PSID_AND_ATTRIBUTES SrcSidAndAttributes,
626 _In_ ULONG AttributeCount,
628 _In_opt_ PVOID AllocatedMem,
629 _In_ ULONG AllocatedLength,
631 _In_ BOOLEAN CaptureIfKernel,
632 _Out_ PSID_AND_ATTRIBUTES *CapturedSidAndAttributes,
634
635VOID
636NTAPI
638 _In_ _Post_invalid_ PSID_AND_ATTRIBUTES CapturedSidAndAttributes,
640 _In_ BOOLEAN CaptureIfKernel);
641
642//
643// ACL functions
644//
645CODE_SEG("INIT")
647NTAPI
649
651NTAPI
654 _In_ PTOKEN PrimaryToken,
655 _Out_ PACL* Dacl);
656
658NTAPI
660 _In_ PACL InputAcl,
663 _In_ BOOLEAN CaptureIfKernel,
664 _Out_ PACL *CapturedAcl);
665
666VOID
667NTAPI
669 _In_ PACL CapturedAcl,
671 _In_ BOOLEAN CaptureIfKernel);
672
675 _Out_writes_bytes_opt_(DaclLength) PACL AclDest,
677 _In_reads_bytes_(AclSource->AclSize) PACL AclSource,
680 _In_ BOOLEAN IsInherited,
683
684PACL
686 _In_opt_ PACL ExplicitAcl,
687 _In_ BOOLEAN ExplicitPresent,
688 _In_ BOOLEAN ExplicitDefaulted,
689 _In_opt_ PACL ParentAcl,
690 _In_opt_ PACL DefaultAcl,
694 _Out_ PBOOLEAN AclPresent,
695 _Out_ PBOOLEAN IsInherited,
698
699//
700// SD functions
701//
702CODE_SEG("INIT")
704NTAPI
706
708NTAPI
713
715NTAPI
718 _Out_ PULONG QuotaInfoSize);
719
720//
721// Security Reference Monitor (SeRm) functions
722//
724NTAPI
726
728NTAPI
730
732NTAPI
735
737NTAPI
740
743 _Inout_ PLUID LogonLuid);
744
747 _Inout_ PLUID LogonLuid);
748
750NTAPI
757
759NTAPI
762 _Out_ PDEVICE_MAP *DeviceMap);
763
764//
765// Audit functions
766//
768NTAPI
771 _In_ BOOLEAN DoAudit,
773
775NTAPI
778
779VOID
780NTAPI
783
784VOID
785NTAPI
788
789VOID
790NTAPI
794 _In_ PPRIVILEGE_SET PrivilegeSet,
796
797//
798// Subject functions
799//
800VOID
801NTAPI
806
807//
808// Security Quality of Service (SQoS) functions
809//
811NTAPI
816 _In_ BOOLEAN CaptureIfKernel,
817 _Out_ PSECURITY_QUALITY_OF_SERVICE *CapturedSecurityQualityOfService,
818 _Out_ PBOOLEAN Present);
819
820VOID
821NTAPI
823 _In_opt_ PSECURITY_QUALITY_OF_SERVICE CapturedSecurityQualityOfService,
825 _In_ BOOLEAN CaptureIfKernel);
826
827//
828// Object type list functions
829//
832 _In_reads_opt_(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
833 _In_ ULONG ObjectTypeListLength,
835 _Out_ POBJECT_TYPE_LIST *CapturedObjectTypeList);
836
837VOID
839 _In_ _Post_invalid_ POBJECT_TYPE_LIST CapturedObjectTypeList,
841
842//
843// Access state functions
844//
846NTAPI
851 _In_ PAUX_ACCESS_DATA AuxData,
852 _In_ ACCESS_MASK Access,
854
855//
856// Access check functions
857//
859NTAPI
865
866#endif
867
868/* EOF */
static OB_SECURITY_METHOD SeDefaultObjectMethod
Definition: ObTypes.c:134
unsigned char BOOLEAN
static GENERIC_MAPPING GenericMapping
Definition: SeInheritance.c:11
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE Parent
Definition: acpixf.h:732
TOKEN_TYPE
Definition: asmpp.cpp:29
LONG NTSTATUS
Definition: precomp.h:26
static WCHAR ServiceName[]
Definition: browser.c:19
@ Ace
Definition: card.h:12
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
Definition: cdrom.h:1444
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define NULL
Definition: types.h:112
static const ACEFLAG AceType[]
Definition: security.c:2382
ULONG SessionId
Definition: dllmain.c:28
UNICODE_STRING Restricted
Definition: utils.c:24
#define ULONG_PTR
Definition: config.h:101
IN CINT OUT PVOID IN ULONG OUT PULONG ReturnLength
Definition: dumpinfo.c:43
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ SECURITY_INFORMATION SecurityInformation
Definition: fltkernel.h:1340
_Inout_ PLIST_ENTRY _In_ PVOID _In_ PSTRING _In_ BOOLEAN _In_ BOOLEAN _In_ ULONG _In_ PFLT_CALLBACK_DATA _In_opt_ PCHECK_FOR_TRAVERSE_ACCESS _In_opt_ PSECURITY_SUBJECT_CONTEXT SubjectContext
Definition: fltkernel.h:2246
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
_In_ GUID _In_ PVOID ValueData
Definition: hubbusif.h:312
static CODE_SEG("PAGE")
Definition: isapnp.c:1482
enum _SECURITY_IMPERSONATION_LEVEL SECURITY_IMPERSONATION_LEVEL
DWORD SECURITY_INFORMATION
Definition: ms-dtyp.idl:311
DWORD * PSECURITY_INFORMATION
Definition: ms-dtyp.idl:311
#define _Out_opt_
Definition: ms_sal.h:346
#define _In_reads_bytes_(size)
Definition: ms_sal.h:321
#define _Inout_
Definition: ms_sal.h:378
#define _Post_invalid_
Definition: ms_sal.h:695
#define _Inout_opt_
Definition: ms_sal.h:379
#define _Out_
Definition: ms_sal.h:345
#define _In_reads_opt_(size)
Definition: ms_sal.h:320
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
#define _Out_writes_bytes_opt_(size)
Definition: ms_sal.h:351
_In_ ACCESS_MASK _In_ ULONG _Out_ PHANDLE TokenHandle
Definition: psfuncs.h:718
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL Dacl
Definition: rtlfuncs.h:1593
_In_opt_ PSID Group
Definition: rtlfuncs.h:1646
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID Owner
Definition: rtlfuncs.h:1597
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID _Inout_ PULONG _Out_writes_bytes_to_opt_ PrimaryGroupSize PSID PrimaryGroup
Definition: rtlfuncs.h:1599
_In_ ULONG _In_ ACCESS_MASK _In_ PSID Sid
Definition: rtlfuncs.h:1133
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_ BOOLEAN EffectiveOnly
Definition: sefuncs.h:403
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_ BOOLEAN _In_ TOKEN_TYPE TokenType
Definition: sefuncs.h:404
int Count
Definition: noreturn.cpp:7
ULONG ACCESS_MASK
Definition: nt_native.h:40
ACCESS_MASK * PACCESS_MASK
Definition: nt_native.h:41
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE _In_ ULONG _In_ ULONG _In_opt_ PTOKEN_GROUPS _In_ PTOKEN_SOURCE _Out_ PVOID _Out_ PULONG _Inout_ PLUID LogonId
PSID SeLocalSystemSid
Definition: sid.c:38
NTSTATUS NTAPI SepRmRemoveLogonSessionFromToken(_Inout_ PTOKEN Token)
Removes a logon session from an access token.
Definition: srm.c:449
NTSTATUS SepPropagateAcl(_Out_writes_bytes_opt_(DaclLength) PACL AclDest, _Inout_ PULONG AclLength, _In_reads_bytes_(AclSource->AclSize) PACL AclSource, _In_ PSID Owner, _In_ PSID Group, _In_ BOOLEAN IsInherited, _In_ BOOLEAN IsDirectoryObject, _In_ PGENERIC_MAPPING GenericMapping)
const LUID SeDebugPrivilege
Definition: priv.c:39
BOOLEAN NTAPI SeTokenCanImpersonate(_In_ PTOKEN ProcessToken, _In_ PTOKEN TokenToImpersonate, _In_ SECURITY_IMPERSONATION_LEVEL ImpersonationLevel)
Ensures that client impersonation can occur by checking if the token we're going to assign as the imp...
Definition: token.c:1969
VOID NTAPI SepReleaseSid(_In_ PSID CapturedSid, _In_ KPROCESSOR_MODE AccessMode, _In_ BOOLEAN CaptureIfKernel)
Releases a captured SID.
Definition: sid.c:400
SID_IDENTIFIER_AUTHORITY SeCreatorSidAuthority
Definition: sid.c:21
PTOKEN SeAnonymousLogonToken
Definition: semgr.c:19
NTSTATUS SepRmDereferenceLogonSession(_Inout_ PLUID LogonLuid)
PSECURITY_DESCRIPTOR SeSystemDefaultSd
Definition: sd.c:20
VOID NTAPI SeCaptureSubjectContextEx(_In_ PETHREAD Thread, _In_ PEPROCESS Process, _Out_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
An extended function that captures the security subject context based upon the specified thread and p...
Definition: subject.c:41
NTSTATUS NTAPI SepRmInsertLogonSessionIntoToken(_Inout_ PTOKEN Token)
Inserts a logon session into an access token specified by the caller.
Definition: srm.c:368
PSID SeAliasAccountOpsSid
Definition: sid.c:45
VOID SepRemovePrivilegeToken(_Inout_ PTOKEN Token, _In_ ULONG Index)
Removes a privilege from the token.
Definition: token.c:582
const LUID SeSyncAgentPrivilege
Definition: priv.c:45
NTSTATUS NTAPI SepCaptureSid(_In_ PSID InputSid, _In_ KPROCESSOR_MODE AccessMode, _In_ POOL_TYPE PoolType, _In_ BOOLEAN CaptureIfKernel, _Out_ PSID *CapturedSid)
Captures a SID.
Definition: sid.c:314
NTSTATUS SepFindPrimaryGroupAndDefaultOwner(_In_ PTOKEN Token, _In_ PSID PrimaryGroup, _In_opt_ PSID DefaultOwner, _Out_opt_ PULONG PrimaryGroupIndex, _Out_opt_ PULONG DefaultOwnerIndex)
Finds the primary group and default owner entity based on the submitted primary group instance and an...
Definition: token.c:1011
BOOLEAN NTAPI SeTokenIsInert(_In_ PTOKEN Token)
Determines if a token is a sandbox inert token or not, based upon the token flags.
Definition: token.c:1337
VOID NTAPI SepInitializeTokenImplementation(VOID)
Internal function that initializes critical kernel data for access token implementation in SRM.
Definition: token.c:1403
const LUID SeSystemProfilePrivilege
Definition: priv.c:30
PACL SePublicOpenDacl
Definition: acl.c:19
const LUID SeCreateTokenPrivilege
Definition: priv.c:21
PSECURITY_DESCRIPTOR SePublicOpenUnrestrictedSd
Definition: sd.c:19
BOOLEAN NTAPI SeInitSystem(VOID)
Main security manager initialization function.
Definition: semgr.c:285
PSID SeRestrictedSid
Definition: sid.c:50
struct _KNOWN_COMPOUND_ACE * PKNOWN_COMPOUND_ACE
FORCEINLINE PSID SepGetOwnerFromDescriptor(_Inout_ PVOID _Descriptor)
Definition: se.h:99
const LUID SeBackupPrivilege
Definition: priv.c:36
PSECURITY_DESCRIPTOR SePublicOpenSd
Definition: sd.c:18
PTOKEN NTAPI SepCreateSystemProcessToken(VOID)
Creates the system process token.
Definition: token.c:1507
NTSTATUS SepCreateTokenLock(_Inout_ PTOKEN Token)
Creates a lock for the token.
Definition: token.c:45
const LUID SeTrustedCredmanPrivilege
Definition: priv.c:50
NTSTATUS NTAPI SeCopyClientToken(_In_ PACCESS_TOKEN Token, _In_ SECURITY_IMPERSONATION_LEVEL Level, _In_ KPROCESSOR_MODE PreviousMode, _Out_ PACCESS_TOKEN *NewToken)
Copies an existing access token (technically duplicating a new one).
Definition: token.c:1296
PACL SePublicDefaultUnrestrictedDacl
Definition: acl.c:18
struct _ACCESS_CHECK_RIGHTS ACCESS_CHECK_RIGHTS
BOOLEAN NTAPI SeCheckPrivilegedObject(_In_ LUID PrivilegeValue, _In_ HANDLE ObjectHandle, _In_ ACCESS_MASK DesiredAccess, _In_ KPROCESSOR_MODE PreviousMode)
Checks a privileged object if such object has the specific privilege submitted by the caller.
Definition: priv.c:803
const LUID SeAssignPrimaryTokenPrivilege
Definition: priv.c:22
NTSTATUS NTAPI SepRegQueryHelper(_In_ PCWSTR KeyName, _In_ PCWSTR ValueName, _In_ ULONG ValueType, _In_ ULONG DataLength, _Out_ PVOID ValueData)
A private registry helper that returns the desired value data based on the specifics requested by the...
Definition: srm.c:93
VOID NTAPI SeReleaseSidAndAttributesArray(_In_ _Post_invalid_ PSID_AND_ATTRIBUTES CapturedSidAndAttributes, _In_ KPROCESSOR_MODE AccessMode, _In_ BOOLEAN CaptureIfKernel)
Releases a captured SID with attributes.
Definition: sid.c:994
BOOLEAN NTAPI SepSidInToken(_In_ PACCESS_TOKEN _Token, _In_ PSID Sid)
Checks if a SID is present in a token.
Definition: sid.c:547
SID_IDENTIFIER_AUTHORITY SeWorldSidAuthority
Definition: sid.c:19
const LUID SeTimeZonePrivilege
Definition: priv.c:53
PSECURITY_DESCRIPTOR SeUnrestrictedSd
Definition: sd.c:21
PSID SeNetworkServiceSid
Definition: sid.c:53
PACL SeSystemAnonymousLogonDacl
Definition: acl.c:22
NTSTATUS NTAPI SeSubProcessToken(_In_ PTOKEN Parent, _Out_ PTOKEN *Token, _In_ BOOLEAN InUse, _In_ ULONG SessionId)
Subtracts a token in exchange of duplicating a new one.
Definition: token.c:1127
struct _KNOWN_COMPOUND_ACE KNOWN_COMPOUND_ACE
_ACCESS_CHECK_RIGHT_TYPE
Definition: se.h:49
@ AccessCheckMaximum
Definition: se.h:50
@ AccessCheckRegular
Definition: se.h:51
struct _ACCESS_CHECK_RIGHTS * PACCESS_CHECK_RIGHTS
NTSTATUS NTAPI SeIsTokenSibling(_In_ PTOKEN Token, _Out_ PBOOLEAN IsSibling)
Checks if the token is a sibling of the other token of the current process that the calling thread is...
Definition: token.c:1236
enum _ACCESS_CHECK_RIGHT_TYPE ACCESS_CHECK_RIGHT_TYPE
VOID NTAPI SepReleaseAcl(_In_ PACL CapturedAcl, _In_ KPROCESSOR_MODE AccessMode, _In_ BOOLEAN CaptureIfKernel)
Releases (frees) a captured ACL from the memory pool.
Definition: acl.c:464
NTSTATUS NTAPI SePrivilegePolicyCheck(_Inout_ PACCESS_MASK DesiredAccess, _Inout_ PACCESS_MASK GrantedAccess, _In_ PSECURITY_SUBJECT_CONTEXT SubjectContext, _In_ PTOKEN Token, _Out_opt_ PPRIVILEGE_SET *OutPrivilegeSet, _In_ KPROCESSOR_MODE PreviousMode)
Checks the security policy and returns a set of privileges based upon the said security policy contex...
Definition: priv.c:244
struct _TOKEN_AUDIT_POLICY_INFORMATION TOKEN_AUDIT_POLICY_INFORMATION
PSID SeBatchSid
Definition: sid.c:34
BOOLEAN NTAPI SeCheckAuditPrivilege(_In_ PSECURITY_SUBJECT_CONTEXT SubjectContext, _In_ KPROCESSOR_MODE PreviousMode)
Checks a single privilege and performs an audit against a privileged service based on a security subj...
Definition: priv.c:360
VOID NTAPI SeReleaseLuidAndAttributesArray(_In_ PLUID_AND_ATTRIBUTES Privilege, _In_ KPROCESSOR_MODE PreviousMode, _In_ BOOLEAN CaptureIfKernel)
Releases a LUID with attributes structure.
Definition: priv.c:554
VOID NTAPI SeAuditProcessExit(_In_ PEPROCESS Process)
Peforms a security auditing against a process that is about to be terminated.
Definition: audit.c:77
const LUID SeSystemtimePrivilege
Definition: priv.c:31
struct _KNOWN_OBJECT_ACE KNOWN_OBJECT_ACE
PACL SePublicOpenUnrestrictedDacl
Definition: acl.c:20
BOOLEAN NTAPI SepPrivilegeCheck(_In_ PTOKEN Token, _In_ PLUID_AND_ATTRIBUTES Privileges, _In_ ULONG PrivilegeCount, _In_ ULONG PrivilegeControl, _In_ KPROCESSOR_MODE PreviousMode)
Checks the privileges pointed by Privileges array argument if they exist and match with the privilege...
Definition: priv.c:104
NTSTATUS NTAPI SepDuplicateToken(_In_ PTOKEN Token, _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ BOOLEAN EffectiveOnly, _In_ TOKEN_TYPE TokenType, _In_ SECURITY_IMPERSONATION_LEVEL Level, _In_ KPROCESSOR_MODE PreviousMode, _Out_ PTOKEN *NewAccessToken)
Duplicates an access token, from an existing valid token.
Definition: tokenlif.c:471
PSID SeCreatorOwnerServerSid
Definition: sid.c:29
const LUID SeCreateGlobalPrivilege
Definition: priv.c:49
PSID SeAliasAdminsSid
Definition: sid.c:41
const LUID SeChangeNotifyPrivilege
Definition: priv.c:42
NTSTATUS NTAPI SepCreateImpersonationTokenDacl(_In_ PTOKEN Token, _In_ PTOKEN PrimaryToken, _Out_ PACL *Dacl)
Allocates a discretionary access control list based on certain properties of a regular and primary ac...
Definition: acl.c:277
PSID SeAnonymousLogonSid
Definition: se.h:203
PSID SeRestrictedCodeSid
Definition: sid.c:40
BOOLEAN NTAPI SeRmInitPhase0(VOID)
Manages the phase 0 initialization of the security reference monitoring module of the kernel.
Definition: srm.c:176
const LUID SeImpersonatePrivilege
Definition: priv.c:48
PACL SeUnrestrictedDacl
Definition: acl.c:21
const LUID SeTcbPrivilege
Definition: priv.c:26
PSECURITY_DESCRIPTOR SePublicDefaultSd
Definition: sd.c:16
PSID SeAliasPowerUsersSid
Definition: sid.c:44
FORCEINLINE PACL SepGetSaclFromDescriptor(_Inout_ PVOID _Descriptor)
Definition: se.h:141
PACL SepSelectAcl(_In_opt_ PACL ExplicitAcl, _In_ BOOLEAN ExplicitPresent, _In_ BOOLEAN ExplicitDefaulted, _In_opt_ PACL ParentAcl, _In_opt_ PACL DefaultAcl, _Out_ PULONG AclLength, _In_ PSID Owner, _In_ PSID Group, _Out_ PBOOLEAN AclPresent, _Out_ PBOOLEAN IsInherited, _In_ BOOLEAN IsDirectoryObject, _In_ PGENERIC_MAPPING GenericMapping)
Selects an ACL and returns it to the caller.
Definition: acl.c:804
VOID NTAPI SePrivilegedServiceAuditAlarm(_In_opt_ PUNICODE_STRING ServiceName, _In_ PSECURITY_SUBJECT_CONTEXT SubjectContext, _In_ PPRIVILEGE_SET PrivilegeSet, _In_ BOOLEAN AccessGranted)
Performs an audit alarm to a privileged service request.
Definition: audit.c:369
ULONG RtlLengthSidAndAttributes(_In_ ULONG Count, _In_ PSID_AND_ATTRIBUTES Src)
Computes the length size of a SID.
Definition: token.c:965
PSID SeInteractiveSid
Definition: sid.c:35
PSID SeWorldSid
Definition: sid.c:25
PSECURITY_DESCRIPTOR SeSystemAnonymousLogonSd
Definition: sd.c:22
PTOKEN SepCreateSystemAnonymousLogonTokenNoEveryone(VOID)
Creates the anonymous logon token for the system. This kind of token doesn't include the everyone SID...
Definition: token.c:1725
PSID SeAuthenticatedUserSid
Definition: sid.c:39
ULONG SepComputeAvailableDynamicSpace(_In_ ULONG DynamicCharged, _In_ PSID PrimaryGroup, _In_opt_ PACL DefaultDacl)
Computes the exact available dynamic area of an access token whilst querying token statistics.
Definition: token.c:659
VOID SepUpdatePrivilegeFlagsToken(_Inout_ PTOKEN Token)
Updates the token's flags based upon the privilege that the token has been granted....
Definition: token.c:554
const LUID SeManageVolumePrivilege
Definition: priv.c:47
PSID SeServiceSid
Definition: sid.c:36
const LUID SeRestorePrivilege
Definition: priv.c:37
NTSTATUS NTAPI SeGetLogonIdDeviceMap(_In_ PLUID LogonId, _Out_ PDEVICE_MAP *DeviceMap)
Retrieves the DOS device map from a logon session.
Definition: srm.c:1347
PSID SeNetworkSid
Definition: sid.c:33
PSECURITY_DESCRIPTOR SePublicDefaultUnrestrictedSd
Definition: sd.c:17
BOOLEAN NTAPI SepInitSecurityIDs(VOID)
Initializes all the SIDs known in the system.
Definition: sid.c:115
struct _KNOWN_OBJECT_ACE * PKNOWN_OBJECT_ACE
VOID NTAPI SeSetSecurityAccessMask(_In_ SECURITY_INFORMATION SecurityInformation, _Out_ PACCESS_MASK DesiredAccess)
Sets the access mask for a security information context.
Definition: semgr.c:460
FORCEINLINE PSID SepGetGroupFromDescriptor(_Inout_ PVOID _Descriptor)
Definition: se.h:79
PSID SeCreatorGroupSid
Definition: sid.c:28
NTSTATUS SepRmReferenceLogonSession(_Inout_ PLUID LogonLuid)
NTSTATUS NTAPI SeExchangePrimaryToken(_In_ PEPROCESS Process, _In_ PACCESS_TOKEN NewAccessToken, _Out_ PACCESS_TOKEN *OldAccessToken)
Replaces the old access token of a process (pointed by the EPROCESS kernel structure) with a new acce...
Definition: token.c:846
PSID SeNtAuthoritySid
Definition: sid.c:31
FORCEINLINE PACL SepGetDaclFromDescriptor(_Inout_ PVOID _Descriptor)
Definition: se.h:119
PTOKEN SeAnonymousLogonTokenNoEveryone
Definition: semgr.c:20
VOID NTAPI SeGetTokenControlInformation(_In_ PACCESS_TOKEN _Token, _Out_ PTOKEN_CONTROL TokenControl)
Retrieves token control information.
Definition: token.c:1474
const LUID SeRemoteShutdownPrivilege
Definition: priv.c:43
const LUID SeLoadDriverPrivilege
Definition: priv.c:29
NTSTATUS NTAPI SepCreateToken(_Out_ PHANDLE TokenHandle, _In_ KPROCESSOR_MODE PreviousMode, _In_ ACCESS_MASK DesiredAccess, _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ TOKEN_TYPE TokenType, _In_ SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, _In_ PLUID AuthenticationId, _In_ PLARGE_INTEGER ExpirationTime, _In_ PSID_AND_ATTRIBUTES User, _In_ ULONG GroupCount, _In_ PSID_AND_ATTRIBUTES Groups, _In_ ULONG GroupsLength, _In_ ULONG PrivilegeCount, _In_ PLUID_AND_ATTRIBUTES Privileges, _In_opt_ PSID Owner, _In_ PSID PrimaryGroup, _In_opt_ PACL DefaultDacl, _In_ PTOKEN_SOURCE TokenSource, _In_ BOOLEAN SystemToken)
Internal function responsible for access token object creation in the kernel. A fully created token o...
Definition: tokenlif.c:97
NTSTATUS NTAPI SeIsTokenChild(_In_ PTOKEN Token, _Out_ PBOOLEAN IsChild)
Checks if the token is a child of the other token of the current process that the calling thread is i...
Definition: token.c:1187
VOID NTAPI SeDeassignPrimaryToken(_Inout_ PEPROCESS Process)
Removes the primary token of a process.
Definition: token.c:936
BOOLEAN NTAPI SepInitDACLs(VOID)
Initializes known discretionary access control lists in the system upon kernel and Executive initiali...
Definition: acl.c:38
const LUID SeIncreaseBasePriorityPrivilege
Definition: priv.c:33
const LUID SeLockMemoryPrivilege
Definition: priv.c:23
const LUID SeCreatePermanentPrivilege
Definition: priv.c:35
PTOKEN SepCreateSystemAnonymousLogonToken(VOID)
Creates the anonymous logon token for the system. The difference between this token and the other one...
Definition: token.c:1657
SID_IDENTIFIER_AUTHORITY SeNullSidAuthority
Definition: sid.c:18
VOID SepRemoveUserGroupToken(_Inout_ PTOKEN Token, _In_ ULONG Index)
Removes a group from the token.
Definition: token.c:618
PSID SeCreatorGroupServerSid
Definition: sid.c:30
SID_IDENTIFIER_AUTHORITY SeNtSidAuthority
Definition: sid.c:22
NTSTATUS NTAPI SepCaptureSecurityQualityOfService(_In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ KPROCESSOR_MODE AccessMode, _In_ POOL_TYPE PoolType, _In_ BOOLEAN CaptureIfKernel, _Out_ PSECURITY_QUALITY_OF_SERVICE *CapturedSecurityQualityOfService, _Out_ PBOOLEAN Present)
Captures the security quality of service data given the object attributes from an object.
Definition: sqos.c:52
PSID SeLocalSid
Definition: sid.c:26
VOID SepUpdateSinglePrivilegeFlagToken(_Inout_ PTOKEN Token, _In_ ULONG Index)
Updates the token's flags based upon the privilege that the token has been granted....
Definition: token.c:442
PSID SeDialupSid
Definition: sid.c:32
const LUID SeUndockPrivilege
Definition: priv.c:44
const LUID SeCreatePagefilePrivilege
Definition: priv.c:34
NTSTATUS NTAPI SeSetWorldSecurityDescriptor(_In_ SECURITY_INFORMATION SecurityInformation, _In_ PISECURITY_DESCRIPTOR SecurityDescriptor, _In_ PULONG BufferLength)
Sets a "World" security descriptor.
Definition: sd.c:155
BOOLEAN NTAPI SepTokenIsOwner(_In_ PACCESS_TOKEN _Token, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ BOOLEAN TokenLocked)
Checks if a token belongs to the main user, being the owner.
Definition: token.c:511
NTSTATUS SeCaptureObjectTypeList(_In_reads_opt_(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList, _In_ ULONG ObjectTypeListLength, _In_ KPROCESSOR_MODE PreviousMode, _Out_ POBJECT_TYPE_LIST *CapturedObjectTypeList)
Captures a list of object types.
Definition: objtype.c:39
NTSTATUS NTAPI SepCaptureAcl(_In_ PACL InputAcl, _In_ KPROCESSOR_MODE AccessMode, _In_ POOL_TYPE PoolType, _In_ BOOLEAN CaptureIfKernel, _Out_ PACL *CapturedAcl)
Captures an access control list from an already valid input ACL.
Definition: acl.c:352
PSID SeCreatorOwnerSid
Definition: sid.c:27
struct _TOKEN_AUDIT_POLICY_INFORMATION * PTOKEN_AUDIT_POLICY_INFORMATION
SID_IDENTIFIER_AUTHORITY SeLocalSidAuthority
Definition: sid.c:20
const LUID SeTakeOwnershipPrivilege
Definition: priv.c:28
const LUID SeProfileSingleProcessPrivilege
Definition: priv.c:32
const LUID SeShutdownPrivilege
Definition: priv.c:38
const LUID SeSystemEnvironmentPrivilege
Definition: priv.c:41
PSID SeAliasUsersSid
Definition: sid.c:42
NTSTATUS NTAPI SeCreateAccessStateEx(_In_ PETHREAD Thread, _In_ PEPROCESS Process, _In_ OUT PACCESS_STATE AccessState, _In_ PAUX_ACCESS_DATA AuxData, _In_ ACCESS_MASK Access, _In_ PGENERIC_MAPPING GenericMapping)
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)
Captures a SID with attributes.
Definition: sid.c:711
const LUID SeSecurityPrivilege
Definition: priv.c:27
const LUID SeUnsolicitedInputPrivilege
Definition: priv.c:25
NTSTATUS NTAPI SeComputeQuotaInformationSize(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PULONG QuotaInfoSize)
const LUID SeCreateSymbolicLinkPrivilege
Definition: priv.c:54
BOOLEAN NTAPI SeDetailedAuditingWithToken(_In_ PTOKEN Token)
Peforms a detailed security auditing with an access token.
Definition: audit.c:34
PSID SeAliasBackupOpsSid
Definition: sid.c:48
const LUID SeEnableDelegationPrivilege
Definition: priv.c:46
BOOLEAN NTAPI SepInitSDs(VOID)
Initializes the known security descriptors in the system.
Definition: sd.c:37
VOID NTAPI SeQuerySecurityAccessMask(_In_ SECURITY_INFORMATION SecurityInformation, _Out_ PACCESS_MASK DesiredAccess)
Queries the access mask from a security information context.
Definition: semgr.c:427
VOID SepDeleteTokenLock(_Inout_ PTOKEN Token)
Deletes a lock of a token.
Definition: token.c:74
PSID SeAuthenticatedUsersSid
Definition: sid.c:49
VOID NTAPI SepReleaseSecurityQualityOfService(_In_opt_ PSECURITY_QUALITY_OF_SERVICE CapturedSecurityQualityOfService, _In_ KPROCESSOR_MODE AccessMode, _In_ BOOLEAN CaptureIfKernel)
Releases (frees) the captured SQOS data from an object in the memory pool.
Definition: sqos.c:225
PSID SeAliasGuestsSid
Definition: sid.c:43
PSID SeAliasSystemOpsSid
Definition: sid.c:46
struct _KNOWN_ACE * PKNOWN_ACE
const LUID SeRelabelPrivilege
Definition: priv.c:51
const LUID SeIncreaseWorkingSetPrivilege
Definition: priv.c:52
BOOLEAN NTAPI SeFastTraverseCheck(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ PACCESS_STATE AccessState, _In_ ACCESS_MASK DesiredAccess, _In_ KPROCESSOR_MODE AccessMode)
Determines whether security access rights can be given to an object depending on the security descrip...
Definition: accesschk.c:930
NTSTATUS NTAPI SeCaptureLuidAndAttributesArray(_In_ PLUID_AND_ATTRIBUTES Src, _In_ ULONG PrivilegeCount, _In_ KPROCESSOR_MODE PreviousMode, _In_ PLUID_AND_ATTRIBUTES AllocatedMem, _In_ ULONG AllocatedLength, _In_ POOL_TYPE PoolType, _In_ BOOLEAN CaptureIfKernel, _Out_ PLUID_AND_ATTRIBUTES *Dest, _Inout_ PULONG Length)
BOOLEAN NTAPI SeRmInitPhase1(VOID)
Manages the phase 1 initialization of the security reference monitoring module of the kernel.
Definition: srm.c:211
VOID SeReleaseObjectTypeList(_In_ _Post_invalid_ POBJECT_TYPE_LIST CapturedObjectTypeList, _In_ KPROCESSOR_MODE PreviousMode)
Releases a buffer list of object types.
Definition: objtype.c:107
BOOLEAN NTAPI SepSidInTokenEx(_In_ PACCESS_TOKEN _Token, _In_ PSID PrincipalSelfSid, _In_ PSID _Sid, _In_ BOOLEAN Deny, _In_ BOOLEAN Restricted)
Checks if a SID is present in a token.
Definition: sid.c:443
NTSTATUS SepRebuildDynamicPartOfToken(_In_ PTOKEN Token, _In_ ULONG NewDynamicPartSize)
const LUID SeAuditPrivilege
Definition: priv.c:40
VOID NTAPI SeAuditProcessCreate(_In_ PEPROCESS Process)
Peforms a security auditing against a process that is about to be created.
Definition: audit.c:56
PSID SeAliasPrintOpsSid
Definition: sid.c:47
struct _KNOWN_ACE KNOWN_ACE
NTSTATUS NTAPI SeInitializeProcessAuditName(_In_ PFILE_OBJECT FileObject, _In_ BOOLEAN DoAudit, _Out_ POBJECT_NAME_INFORMATION *AuditInfo)
Initializes a process audit name and returns it to the caller.
Definition: audit.c:105
PSID SePrincipalSelfSid
Definition: sid.c:37
const LUID SeIncreaseQuotaPrivilege
Definition: priv.c:24
PSID SeLocalServiceSid
Definition: sid.c:52
VOID NTAPI SepInitPrivileges(VOID)
Initializes the privileges during the startup phase of the security manager module....
Definition: priv.c:71
PSID SeNullSid
Definition: sid.c:24
PSID NTAPI SepGetSidFromAce(_In_ UCHAR AceType, _In_ PACE Ace)
Captures a security identifier from a given access control entry. This identifier is valid for the wh...
Definition: sid.c:579
VOID SepDumpTokenDebugInfo(_In_opt_ PTOKEN Token)
Dumps debug information of an access token to the debugger.
Definition: debug.c:280
VOID SepDumpAccessRightsStats(_In_ PACCESS_CHECK_RIGHTS AccessRights)
Dumps security access rights to the debugger.
Definition: debug.c:325
VOID SepDumpSdDebugInfo(_In_opt_ PISECURITY_DESCRIPTOR SecurityDescriptor)
Dumps debug information of a security descriptor to the debugger.
Definition: debug.c:217
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
unsigned short USHORT
Definition: pedump.c:61
ACCESS_MASK RemainingAccessRights
Definition: se.h:43
ACCESS_MASK DeniedAccessRights
Definition: se.h:45
ACCESS_MASK GrantedAccessRights
Definition: se.h:44
Definition: rtltypes.h:993
Definition: se.h:15
ACE_HEADER Header
Definition: se.h:16
ULONG SidStart
Definition: se.h:18
ACCESS_MASK Mask
Definition: se.h:17
ACE_HEADER Header
Definition: se.h:31
USHORT Reserved
Definition: se.h:34
USHORT CompoundAceType
Definition: se.h:33
ULONG SidStart
Definition: se.h:35
ACCESS_MASK Mask
Definition: se.h:32
ULONG SidStart
Definition: se.h:26
ACE_HEADER Header
Definition: se.h:23
ACCESS_MASK Mask
Definition: se.h:24
ULONG Flags
Definition: se.h:25
struct _TOKEN_AUDIT_POLICY_INFORMATION::@1783 Policies[1]
uint32_t * PULONG
Definition: typedefs.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
unsigned char * PBOOLEAN
Definition: typedefs.h:53
INT POOL_TYPE
Definition: typedefs.h:78
#define NTAPI
Definition: typedefs.h:36
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
BOOL Privilege(LPTSTR pszPrivilege, BOOL bEnable)
Definition: user_lib.cpp:531
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2658
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2699
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG _Out_opt_ PULONG _Out_opt_ PULONG ValueType
Definition: wdfregistry.h:282
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:243
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
Definition: wdfresource.h:342
#define FORCEINLINE
Definition: wdftypes.h:67
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:56
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: wsk.h:191
* PFILE_OBJECT
Definition: iotypes.h:1998
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
_In_ PEPROCESS _In_ KPROCESSOR_MODE AccessMode
Definition: mmfuncs.h:396
_Out_ PBOOLEAN _Out_ PBOOLEAN _Out_ PSECURITY_IMPERSONATION_LEVEL ImpersonationLevel
Definition: psfuncs.h:156
_In_ ULONG AclLength
Definition: rtlfuncs.h:1842
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET * Privileges
Definition: sefuncs.h:17
_In_opt_ PVOID _In_opt_ PUNICODE_STRING _In_ PSECURITY_DESCRIPTOR _In_ PACCESS_STATE _In_ BOOLEAN _In_ BOOLEAN AccessGranted
Definition: sefuncs.h:419
_In_ KPROCESSOR_MODE PreviousMode
Definition: sefuncs.h:103
_In_opt_ PSECURITY_DESCRIPTOR _Out_ PSECURITY_DESCRIPTOR _In_ BOOLEAN IsDirectoryObject
Definition: sefuncs.h:31
_In_opt_ PVOID _In_opt_ PUNICODE_STRING _In_ PSECURITY_DESCRIPTOR _In_ PACCESS_STATE AccessState
Definition: sefuncs.h:417
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET _In_ PGENERIC_MAPPING _In_ KPROCESSOR_MODE _Out_ PACCESS_MASK GrantedAccess
Definition: sefuncs.h:20
SECURITY_OPERATION_CODE
Definition: setypes.h:170
struct _SECURITY_DESCRIPTOR_RELATIVE * PISECURITY_DESCRIPTOR_RELATIVE
struct _SECURITY_DESCRIPTOR * PISECURITY_DESCRIPTOR
#define SE_SELF_RELATIVE
Definition: setypes.h:830
@ TokenSource
Definition: setypes.h:968
#define SE_SACL_PRESENT
Definition: setypes.h:819
#define SE_DACL_PRESENT
Definition: setypes.h:817
unsigned char UCHAR
Definition: xmlstorage.h:181