2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: ntoskrnl/se/semgr.c
5 * PURPOSE: Security manager
7 * PROGRAMMERS: No programmer listed.
10 /* INCLUDES *******************************************************************/
16 /* GLOBALS ********************************************************************/
18 PSE_EXPORTS SeExports
= NULL
;
19 SE_EXPORTS SepExports
;
21 extern ULONG ExpInitializationPhase
;
22 extern ERESOURCE SepSubjectContextLock
;
24 /* PRIVATE FUNCTIONS **********************************************************/
26 static BOOLEAN INIT_FUNCTION
29 SepExports
.SeCreateTokenPrivilege
= SeCreateTokenPrivilege
;
30 SepExports
.SeAssignPrimaryTokenPrivilege
= SeAssignPrimaryTokenPrivilege
;
31 SepExports
.SeLockMemoryPrivilege
= SeLockMemoryPrivilege
;
32 SepExports
.SeIncreaseQuotaPrivilege
= SeIncreaseQuotaPrivilege
;
33 SepExports
.SeUnsolicitedInputPrivilege
= SeUnsolicitedInputPrivilege
;
34 SepExports
.SeTcbPrivilege
= SeTcbPrivilege
;
35 SepExports
.SeSecurityPrivilege
= SeSecurityPrivilege
;
36 SepExports
.SeTakeOwnershipPrivilege
= SeTakeOwnershipPrivilege
;
37 SepExports
.SeLoadDriverPrivilege
= SeLoadDriverPrivilege
;
38 SepExports
.SeCreatePagefilePrivilege
= SeCreatePagefilePrivilege
;
39 SepExports
.SeIncreaseBasePriorityPrivilege
= SeIncreaseBasePriorityPrivilege
;
40 SepExports
.SeSystemProfilePrivilege
= SeSystemProfilePrivilege
;
41 SepExports
.SeSystemtimePrivilege
= SeSystemtimePrivilege
;
42 SepExports
.SeProfileSingleProcessPrivilege
= SeProfileSingleProcessPrivilege
;
43 SepExports
.SeCreatePermanentPrivilege
= SeCreatePermanentPrivilege
;
44 SepExports
.SeBackupPrivilege
= SeBackupPrivilege
;
45 SepExports
.SeRestorePrivilege
= SeRestorePrivilege
;
46 SepExports
.SeShutdownPrivilege
= SeShutdownPrivilege
;
47 SepExports
.SeDebugPrivilege
= SeDebugPrivilege
;
48 SepExports
.SeAuditPrivilege
= SeAuditPrivilege
;
49 SepExports
.SeSystemEnvironmentPrivilege
= SeSystemEnvironmentPrivilege
;
50 SepExports
.SeChangeNotifyPrivilege
= SeChangeNotifyPrivilege
;
51 SepExports
.SeRemoteShutdownPrivilege
= SeRemoteShutdownPrivilege
;
53 SepExports
.SeNullSid
= SeNullSid
;
54 SepExports
.SeWorldSid
= SeWorldSid
;
55 SepExports
.SeLocalSid
= SeLocalSid
;
56 SepExports
.SeCreatorOwnerSid
= SeCreatorOwnerSid
;
57 SepExports
.SeCreatorGroupSid
= SeCreatorGroupSid
;
58 SepExports
.SeNtAuthoritySid
= SeNtAuthoritySid
;
59 SepExports
.SeDialupSid
= SeDialupSid
;
60 SepExports
.SeNetworkSid
= SeNetworkSid
;
61 SepExports
.SeBatchSid
= SeBatchSid
;
62 SepExports
.SeInteractiveSid
= SeInteractiveSid
;
63 SepExports
.SeLocalSystemSid
= SeLocalSystemSid
;
64 SepExports
.SeAliasAdminsSid
= SeAliasAdminsSid
;
65 SepExports
.SeAliasUsersSid
= SeAliasUsersSid
;
66 SepExports
.SeAliasGuestsSid
= SeAliasGuestsSid
;
67 SepExports
.SeAliasPowerUsersSid
= SeAliasPowerUsersSid
;
68 SepExports
.SeAliasAccountOpsSid
= SeAliasAccountOpsSid
;
69 SepExports
.SeAliasSystemOpsSid
= SeAliasSystemOpsSid
;
70 SepExports
.SeAliasPrintOpsSid
= SeAliasPrintOpsSid
;
71 SepExports
.SeAliasBackupOpsSid
= SeAliasBackupOpsSid
;
72 SepExports
.SeAuthenticatedUsersSid
= SeAuthenticatedUsersSid
;
73 SepExports
.SeRestrictedSid
= SeRestrictedSid
;
74 SepExports
.SeAnonymousLogonSid
= SeAnonymousLogonSid
;
76 SepExports
.SeUndockPrivilege
= SeUndockPrivilege
;
77 SepExports
.SeSyncAgentPrivilege
= SeSyncAgentPrivilege
;
78 SepExports
.SeEnableDelegationPrivilege
= SeEnableDelegationPrivilege
;
80 SeExports
= &SepExports
;
87 SepInitializationPhase0(VOID
)
92 if (!SepInitSecurityIDs()) return FALSE
;
93 if (!SepInitDACLs()) return FALSE
;
94 if (!SepInitSDs()) return FALSE
;
96 if (!SepInitExports()) return FALSE
;
98 /* Initialize the subject context lock */
99 ExInitializeResource(&SepSubjectContextLock
);
101 /* Initialize token objects */
102 SepInitializeTokenImplementation();
104 /* Clear impersonation info for the idle thread */
105 PsGetCurrentThread()->ImpersonationInfo
= NULL
;
106 PspClearCrossThreadFlag(PsGetCurrentThread(),
107 CT_ACTIVE_IMPERSONATION_INFO_BIT
);
109 /* Initialize the boot token */
110 ObInitializeFastReference(&PsGetCurrentProcess()->Token
, NULL
);
111 ObInitializeFastReference(&PsGetCurrentProcess()->Token
,
112 SepCreateSystemProcessToken());
118 SepInitializationPhase1(VOID
)
123 /* Insert the system token into the tree */
124 Status
= ObInsertObject((PVOID
)(PsGetCurrentProcess()->Token
.Value
&
131 ASSERT(NT_SUCCESS(Status
));
133 /* FIXME: TODO \\ Security directory */
141 /* Check the initialization phase */
142 switch (ExpInitializationPhase
)
147 return SepInitializationPhase0();
152 return SepInitializationPhase1();
156 /* Don't know any other phase! Bugcheck! */
157 KeBugCheckEx(UNEXPECTED_INITIALIZATION_CALL
,
159 ExpInitializationPhase
,
170 OBJECT_ATTRIBUTES ObjectAttributes
;
172 HANDLE DirectoryHandle
;
176 /* Create '\Security' directory */
177 RtlInitUnicodeString(&Name
,
179 InitializeObjectAttributes(&ObjectAttributes
,
184 Status
= ZwCreateDirectoryObject(&DirectoryHandle
,
185 DIRECTORY_ALL_ACCESS
,
187 if (!NT_SUCCESS(Status
))
189 DPRINT1("Failed to create 'Security' directory!\n");
193 /* Create 'LSA_AUTHENTICATION_INITALIZED' event */
194 RtlInitUnicodeString(&Name
,
195 L
"\\LSA_AUTHENTICATION_INITALIZED");
196 InitializeObjectAttributes(&ObjectAttributes
,
201 Status
= ZwCreateEvent(&EventHandle
,
204 SynchronizationEvent
,
206 if (!NT_SUCCESS(Status
))
208 DPRINT1("Failed to create 'LSA_AUTHENTICATION_INITALIZED' event!\n");
209 NtClose(DirectoryHandle
);
213 ZwClose(EventHandle
);
214 ZwClose(DirectoryHandle
);
216 /* FIXME: Create SRM port and listener thread */
223 SeDefaultObjectMethod(IN PVOID Object
,
224 IN SECURITY_OPERATION_CODE OperationType
,
225 IN PSECURITY_INFORMATION SecurityInformation
,
226 IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor
,
227 IN OUT PULONG ReturnLength OPTIONAL
,
228 IN OUT PSECURITY_DESCRIPTOR
*OldSecurityDescriptor
,
229 IN POOL_TYPE PoolType
,
230 IN PGENERIC_MAPPING GenericMapping
)
234 /* Select the operation type */
235 switch (OperationType
)
237 /* Setting a new descriptor */
238 case SetSecurityDescriptor
:
241 ASSERT((PoolType
== PagedPool
) || (PoolType
== NonPagedPool
));
243 /* Set the information */
244 return ObSetSecurityDescriptorInfo(Object
,
247 OldSecurityDescriptor
,
251 case QuerySecurityDescriptor
:
253 /* Query the information */
254 return ObQuerySecurityDescriptorInfo(Object
,
258 OldSecurityDescriptor
);
260 case DeleteSecurityDescriptor
:
263 return ObDeassignSecurity(OldSecurityDescriptor
);
265 case AssignSecurityDescriptor
:
268 ObAssignObjectSecurityDescriptor(Object
, SecurityDescriptor
, PoolType
);
269 return STATUS_SUCCESS
;
274 KeBugCheckEx(SECURITY_SYSTEM
, 0, STATUS_INVALID_PARAMETER
, 0, 0);
277 /* Should never reach here */
279 return STATUS_SUCCESS
;
282 ULONG SidInTokenCalls
= 0;
285 SepSidInToken(PACCESS_TOKEN _Token
,
289 PTOKEN Token
= (PTOKEN
)_Token
;
294 if (!(SidInTokenCalls
% 10000)) DPRINT1("SidInToken Calls: %d\n", SidInTokenCalls
);
296 if (Token
->UserAndGroupCount
== 0)
301 for (i
=0; i
<Token
->UserAndGroupCount
; i
++)
303 if (RtlEqualSid(Sid
, Token
->UserAndGroups
[i
].Sid
))
305 if ((i
== 0)|| (Token
->UserAndGroups
[i
].Attributes
& SE_GROUP_ENABLED
))
319 SeQuerySecurityAccessMask(IN SECURITY_INFORMATION SecurityInformation
,
320 OUT PACCESS_MASK DesiredAccess
)
324 if (SecurityInformation
& (OWNER_SECURITY_INFORMATION
|
325 GROUP_SECURITY_INFORMATION
| DACL_SECURITY_INFORMATION
))
327 *DesiredAccess
|= READ_CONTROL
;
329 if (SecurityInformation
& SACL_SECURITY_INFORMATION
)
331 *DesiredAccess
|= ACCESS_SYSTEM_SECURITY
;
336 SeSetSecurityAccessMask(IN SECURITY_INFORMATION SecurityInformation
,
337 OUT PACCESS_MASK DesiredAccess
)
341 if (SecurityInformation
& (OWNER_SECURITY_INFORMATION
| GROUP_SECURITY_INFORMATION
))
343 *DesiredAccess
|= WRITE_OWNER
;
345 if (SecurityInformation
& DACL_SECURITY_INFORMATION
)
347 *DesiredAccess
|= WRITE_DAC
;
349 if (SecurityInformation
& SACL_SECURITY_INFORMATION
)
351 *DesiredAccess
|= ACCESS_SYSTEM_SECURITY
;
356 SepAccessCheck(IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
357 IN PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext
,
358 IN BOOLEAN SubjectContextLocked
,
359 IN ACCESS_MASK DesiredAccess
,
360 IN ACCESS_MASK PreviouslyGrantedAccess
,
361 OUT PPRIVILEGE_SET
* Privileges
,
362 IN PGENERIC_MAPPING GenericMapping
,
363 IN KPROCESSOR_MODE AccessMode
,
364 OUT PACCESS_MASK GrantedAccess
,
365 OUT PNTSTATUS AccessStatus
,
366 SECURITY_IMPERSONATION_LEVEL LowestImpersonationLevel
)
368 LUID_AND_ATTRIBUTES Privilege
;
369 ACCESS_MASK CurrentAccess
, AccessMask
;
380 /* Check if this is kernel mode */
381 if (AccessMode
== KernelMode
)
383 /* Check if kernel wants everything */
384 if (DesiredAccess
& MAXIMUM_ALLOWED
)
387 *GrantedAccess
= GenericMapping
->GenericAll
;
388 *GrantedAccess
|= (DesiredAccess
&~ MAXIMUM_ALLOWED
);
389 *GrantedAccess
|= PreviouslyGrantedAccess
;
393 /* Give the desired and previous access */
394 *GrantedAccess
= DesiredAccess
| PreviouslyGrantedAccess
;
398 *AccessStatus
= STATUS_SUCCESS
;
402 /* Check if we didn't get an SD */
403 if (!SecurityDescriptor
)
405 /* Automatic failure */
406 *AccessStatus
= STATUS_ACCESS_DENIED
;
410 /* Check for invalid impersonation */
411 if ((SubjectSecurityContext
->ClientToken
) &&
412 (SubjectSecurityContext
->ImpersonationLevel
< LowestImpersonationLevel
))
414 *AccessStatus
= STATUS_BAD_IMPERSONATION_LEVEL
;
418 /* Check for no access desired */
421 /* Check if we had no previous access */
422 if (!PreviouslyGrantedAccess
)
424 /* Then there's nothing to give */
425 *AccessStatus
= STATUS_ACCESS_DENIED
;
429 /* Return the previous access only */
430 *GrantedAccess
= PreviouslyGrantedAccess
;
431 *AccessStatus
= STATUS_SUCCESS
;
436 /* Acquire the lock if needed */
437 if (!SubjectContextLocked
) SeLockSubjectContext(SubjectSecurityContext
);
439 /* Map given accesses */
440 RtlMapGenericMask(&DesiredAccess
, GenericMapping
);
441 if (PreviouslyGrantedAccess
)
442 RtlMapGenericMask(&PreviouslyGrantedAccess
, GenericMapping
);
446 CurrentAccess
= PreviouslyGrantedAccess
;
450 Token
= SubjectSecurityContext
->ClientToken
?
451 SubjectSecurityContext
->ClientToken
: SubjectSecurityContext
->PrimaryToken
;
454 Status
= RtlGetDaclSecurityDescriptor(SecurityDescriptor
,
458 if (!NT_SUCCESS(Status
))
460 if (SubjectContextLocked
== FALSE
)
462 SeUnlockSubjectContext(SubjectSecurityContext
);
465 *AccessStatus
= Status
;
469 /* RULE 1: Grant desired access if the object is unprotected */
470 if (Present
== TRUE
&& Dacl
== NULL
)
472 if (SubjectContextLocked
== FALSE
)
474 SeUnlockSubjectContext(SubjectSecurityContext
);
477 if (DesiredAccess
& MAXIMUM_ALLOWED
)
479 *GrantedAccess
= GenericMapping
->GenericAll
;
480 *GrantedAccess
|= (DesiredAccess
& ~MAXIMUM_ALLOWED
);
484 *GrantedAccess
= DesiredAccess
| PreviouslyGrantedAccess
;
487 *AccessStatus
= STATUS_SUCCESS
;
491 CurrentAccess
= PreviouslyGrantedAccess
;
493 /* RULE 2: Check token for 'take ownership' privilege */
494 Privilege
.Luid
= SeTakeOwnershipPrivilege
;
495 Privilege
.Attributes
= SE_PRIVILEGE_ENABLED
;
497 if (SepPrivilegeCheck(Token
,
500 PRIVILEGE_SET_ALL_NECESSARY
,
503 CurrentAccess
|= WRITE_OWNER
;
504 if ((DesiredAccess
& ~VALID_INHERIT_FLAGS
) ==
505 (CurrentAccess
& ~VALID_INHERIT_FLAGS
))
507 if (SubjectContextLocked
== FALSE
)
509 SeUnlockSubjectContext(SubjectSecurityContext
);
512 *GrantedAccess
= CurrentAccess
;
513 *AccessStatus
= STATUS_SUCCESS
;
518 /* RULE 3: Check whether the token is the owner */
519 Status
= RtlGetOwnerSecurityDescriptor(SecurityDescriptor
,
522 if (!NT_SUCCESS(Status
))
524 DPRINT1("RtlGetOwnerSecurityDescriptor() failed (Status %lx)\n", Status
);
525 if (SubjectContextLocked
== FALSE
)
527 SeUnlockSubjectContext(SubjectSecurityContext
);
530 *AccessStatus
= Status
;
534 if (Sid
&& SepSidInToken(Token
, Sid
))
536 CurrentAccess
|= (READ_CONTROL
| WRITE_DAC
);
537 if ((DesiredAccess
& ~VALID_INHERIT_FLAGS
) ==
538 (CurrentAccess
& ~VALID_INHERIT_FLAGS
))
540 if (SubjectContextLocked
== FALSE
)
542 SeUnlockSubjectContext(SubjectSecurityContext
);
545 *GrantedAccess
= CurrentAccess
;
546 *AccessStatus
= STATUS_SUCCESS
;
551 /* Fail if DACL is absent */
552 if (Present
== FALSE
)
554 if (SubjectContextLocked
== FALSE
)
556 SeUnlockSubjectContext(SubjectSecurityContext
);
560 *AccessStatus
= STATUS_ACCESS_DENIED
;
564 /* RULE 4: Grant rights according to the DACL */
565 CurrentAce
= (PACE
)(Dacl
+ 1);
566 for (i
= 0; i
< Dacl
->AceCount
; i
++)
568 Sid
= (PSID
)(CurrentAce
+ 1);
569 if (CurrentAce
->Header
.AceType
== ACCESS_DENIED_ACE_TYPE
)
571 if (SepSidInToken(Token
, Sid
))
573 if (SubjectContextLocked
== FALSE
)
575 SeUnlockSubjectContext(SubjectSecurityContext
);
579 *AccessStatus
= STATUS_ACCESS_DENIED
;
584 else if (CurrentAce
->Header
.AceType
== ACCESS_ALLOWED_ACE_TYPE
)
586 if (SepSidInToken(Token
, Sid
))
588 AccessMask
= CurrentAce
->AccessMask
;
589 RtlMapGenericMask(&AccessMask
, GenericMapping
);
590 CurrentAccess
|= AccessMask
;
595 DPRINT1("Unknown Ace type 0x%lx\n", CurrentAce
->Header
.AceType
);
597 CurrentAce
= (PACE
)((ULONG_PTR
)CurrentAce
+ CurrentAce
->Header
.AceSize
);
600 if (SubjectContextLocked
== FALSE
)
602 SeUnlockSubjectContext(SubjectSecurityContext
);
605 DPRINT("CurrentAccess %08lx\n DesiredAccess %08lx\n",
606 CurrentAccess
, DesiredAccess
);
608 *GrantedAccess
= CurrentAccess
& DesiredAccess
;
610 if (DesiredAccess
& MAXIMUM_ALLOWED
)
612 *GrantedAccess
= CurrentAccess
;
613 *AccessStatus
= STATUS_SUCCESS
;
616 else if ((*GrantedAccess
& ~VALID_INHERIT_FLAGS
) ==
617 (DesiredAccess
& ~VALID_INHERIT_FLAGS
))
619 *AccessStatus
= STATUS_SUCCESS
;
624 DPRINT1("HACK: Should deny access for caller: granted 0x%lx, desired 0x%lx (generic mapping %p).\n",
625 *GrantedAccess
, DesiredAccess
, GenericMapping
);
626 //*AccessStatus = STATUS_ACCESS_DENIED;
628 *AccessStatus
= STATUS_SUCCESS
;
633 /* PUBLIC FUNCTIONS ***********************************************************/
639 SeAccessCheck(IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
640 IN PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext
,
641 IN BOOLEAN SubjectContextLocked
,
642 IN ACCESS_MASK DesiredAccess
,
643 IN ACCESS_MASK PreviouslyGrantedAccess
,
644 OUT PPRIVILEGE_SET
* Privileges
,
645 IN PGENERIC_MAPPING GenericMapping
,
646 IN KPROCESSOR_MODE AccessMode
,
647 OUT PACCESS_MASK GrantedAccess
,
648 OUT PNTSTATUS AccessStatus
)
650 /* Call the internal function */
651 return SepAccessCheck(SecurityDescriptor
,
652 SubjectSecurityContext
,
653 SubjectContextLocked
,
655 PreviouslyGrantedAccess
,
661 SecurityImpersonation
);
664 /* SYSTEM CALLS ***************************************************************/
671 NtAccessCheck(IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
672 IN HANDLE TokenHandle
,
673 IN ACCESS_MASK DesiredAccess
,
674 IN PGENERIC_MAPPING GenericMapping
,
675 OUT PPRIVILEGE_SET PrivilegeSet OPTIONAL
,
676 IN OUT PULONG PrivilegeSetLength
,
677 OUT PACCESS_MASK GrantedAccess
,
678 OUT PNTSTATUS AccessStatus
)
680 SECURITY_SUBJECT_CONTEXT SubjectSecurityContext
;
681 KPROCESSOR_MODE PreviousMode
= ExGetPreviousMode();
686 /* Check if this is kernel mode */
687 if (PreviousMode
== KernelMode
)
689 /* Check if kernel wants everything */
690 if (DesiredAccess
& MAXIMUM_ALLOWED
)
693 *GrantedAccess
= GenericMapping
->GenericAll
;
694 *GrantedAccess
|= (DesiredAccess
&~ MAXIMUM_ALLOWED
);
698 /* Just give the desired access */
699 *GrantedAccess
= DesiredAccess
;
703 *AccessStatus
= STATUS_SUCCESS
;
704 return STATUS_SUCCESS
;
707 /* Protect probe in SEH */
710 /* Probe all pointers */
711 ProbeForRead(GenericMapping
, sizeof(GENERIC_MAPPING
), sizeof(ULONG
));
712 ProbeForRead(PrivilegeSetLength
, sizeof(ULONG
), sizeof(ULONG
));
713 ProbeForWrite(PrivilegeSet
, *PrivilegeSetLength
, sizeof(ULONG
));
714 ProbeForWrite(GrantedAccess
, sizeof(ACCESS_MASK
), sizeof(ULONG
));
715 ProbeForWrite(AccessStatus
, sizeof(NTSTATUS
), sizeof(ULONG
));
717 _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER
)
719 /* Return the exception code */
720 _SEH2_YIELD(return _SEH2_GetExceptionCode());
724 /* Check for unmapped access rights */
725 if (DesiredAccess
& (GENERIC_READ
| GENERIC_WRITE
| GENERIC_EXECUTE
| GENERIC_ALL
))
726 return STATUS_GENERIC_NOT_MAPPED
;
728 /* Reference the token */
729 Status
= ObReferenceObjectByHandle(TokenHandle
,
735 if (!NT_SUCCESS(Status
))
737 DPRINT1("Failed to reference token (Status %lx)\n", Status
);
741 /* Check token type */
742 if (Token
->TokenType
!= TokenImpersonation
)
744 DPRINT1("No impersonation token\n");
745 ObDereferenceObject(Token
);
746 return STATUS_NO_IMPERSONATION_TOKEN
;
749 /* Check the impersonation level */
750 if (Token
->ImpersonationLevel
< SecurityIdentification
)
752 DPRINT1("Impersonation level < SecurityIdentification\n");
753 ObDereferenceObject(Token
);
754 return STATUS_BAD_IMPERSONATION_LEVEL
;
757 /* Set up the subject context, and lock it */
758 SubjectSecurityContext
.ClientToken
= Token
;
759 SubjectSecurityContext
.ImpersonationLevel
= Token
->ImpersonationLevel
;
760 SubjectSecurityContext
.PrimaryToken
= NULL
;
761 SubjectSecurityContext
.ProcessAuditId
= NULL
;
762 SeLockSubjectContext(&SubjectSecurityContext
);
764 /* Now perform the access check */
765 SepAccessCheck(SecurityDescriptor
,
766 &SubjectSecurityContext
,
770 &PrivilegeSet
, //FIXME
775 SecurityIdentification
);
777 /* Unlock subject context and dereference the token */
778 SeUnlockSubjectContext(&SubjectSecurityContext
);
779 ObDereferenceObject(Token
);
781 /* Check succeeded */
782 return STATUS_SUCCESS
;
788 NtAccessCheckByType(IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
789 IN PSID PrincipalSelfSid
,
790 IN HANDLE ClientToken
,
791 IN ACCESS_MASK DesiredAccess
,
792 IN POBJECT_TYPE_LIST ObjectTypeList
,
793 IN ULONG ObjectTypeLength
,
794 IN PGENERIC_MAPPING GenericMapping
,
795 IN PPRIVILEGE_SET PrivilegeSet
,
796 IN ULONG PrivilegeSetLength
,
797 OUT PACCESS_MASK GrantedAccess
,
798 OUT PNTSTATUS AccessStatus
)
801 return STATUS_NOT_IMPLEMENTED
;
806 NtAccessCheckByTypeAndAuditAlarm(IN PUNICODE_STRING SubsystemName
,
808 IN PUNICODE_STRING ObjectTypeName
,
809 IN PUNICODE_STRING ObjectName
,
810 IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
811 IN PSID PrincipalSelfSid
,
812 IN ACCESS_MASK DesiredAccess
,
813 IN AUDIT_EVENT_TYPE AuditType
,
815 IN POBJECT_TYPE_LIST ObjectTypeList
,
816 IN ULONG ObjectTypeLength
,
817 IN PGENERIC_MAPPING GenericMapping
,
818 IN BOOLEAN ObjectCreation
,
819 OUT PACCESS_MASK GrantedAccess
,
820 OUT PNTSTATUS AccessStatus
,
821 OUT PBOOLEAN GenerateOnClose
)
824 return STATUS_NOT_IMPLEMENTED
;
829 NtAccessCheckByTypeResultList(IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
830 IN PSID PrincipalSelfSid
,
831 IN HANDLE ClientToken
,
832 IN ACCESS_MASK DesiredAccess
,
833 IN POBJECT_TYPE_LIST ObjectTypeList
,
834 IN ULONG ObjectTypeLength
,
835 IN PGENERIC_MAPPING GenericMapping
,
836 IN PPRIVILEGE_SET PrivilegeSet
,
837 IN ULONG PrivilegeSetLength
,
838 OUT PACCESS_MASK GrantedAccess
,
839 OUT PNTSTATUS AccessStatus
)
842 return STATUS_NOT_IMPLEMENTED
;
847 NtAccessCheckByTypeResultListAndAuditAlarm(IN PUNICODE_STRING SubsystemName
,
849 IN PUNICODE_STRING ObjectTypeName
,
850 IN PUNICODE_STRING ObjectName
,
851 IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
852 IN PSID PrincipalSelfSid
,
853 IN ACCESS_MASK DesiredAccess
,
854 IN AUDIT_EVENT_TYPE AuditType
,
856 IN POBJECT_TYPE_LIST ObjectTypeList
,
857 IN ULONG ObjectTypeLength
,
858 IN PGENERIC_MAPPING GenericMapping
,
859 IN BOOLEAN ObjectCreation
,
860 OUT PACCESS_MASK GrantedAccess
,
861 OUT PNTSTATUS AccessStatus
,
862 OUT PBOOLEAN GenerateOnClose
)
865 return STATUS_NOT_IMPLEMENTED
;
870 NtAccessCheckByTypeResultListAndAuditAlarmByHandle(IN PUNICODE_STRING SubsystemName
,
872 IN HANDLE ClientToken
,
873 IN PUNICODE_STRING ObjectTypeName
,
874 IN PUNICODE_STRING ObjectName
,
875 IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
876 IN PSID PrincipalSelfSid
,
877 IN ACCESS_MASK DesiredAccess
,
878 IN AUDIT_EVENT_TYPE AuditType
,
880 IN POBJECT_TYPE_LIST ObjectTypeList
,
881 IN ULONG ObjectTypeLength
,
882 IN PGENERIC_MAPPING GenericMapping
,
883 IN BOOLEAN ObjectCreation
,
884 OUT PACCESS_MASK GrantedAccess
,
885 OUT PNTSTATUS AccessStatus
,
886 OUT PBOOLEAN GenerateOnClose
)
889 return STATUS_NOT_IMPLEMENTED
;