#include "ntos.h"
#include "sep.h"
#include "seopaque.h"
Go to the source code of this file.
Classes | |
struct | _TOKEN |
struct | _IOBJECT_TYPE_LIST |
Defines | |
#define | IF_TOKEN_GLOBAL(FlagName) if (FALSE) |
#define | TokenDiagPrint(FlagName, _Text_) ; |
#define | TOKEN_DIAG_TOKEN_LOCKS ((ULONG) 0x00000001L) |
#define | TOKEN_DEFAULT_DYNAMIC_CHARGE 500 |
#define | OBJECT_SUCCESS_AUDIT 0x1 |
#define | OBJECT_FAILURE_AUDIT 0x2 |
#define | SepAcquireTokenReadLock(T) |
#define | SepAcquireTokenWriteLock(T) |
#define | SepReleaseTokenReadLock(T) |
#define | SepReleaseTokenWriteLock(T, M) |
#define | SepArrayPrivilegeAttributes(P, I) ( (P)[I].Attributes ) |
#define | SepTokenPrivilegeAttributes(T, I) ( (T)->Privileges[I].Attributes ) |
#define | SepArrayGroupAttributes(G, I) ( (G)[I].Attributes ) |
#define | SepTokenGroupAttributes(T, I) ( (T)->UserAndGroups[I].Attributes ) |
Typedefs | |
typedef _TOKEN | TOKEN |
typedef _TOKEN * | PTOKEN |
typedef _IOBJECT_TYPE_LIST | IOBJECT_TYPE_LIST |
typedef _IOBJECT_TYPE_LIST * | PIOBJECT_TYPE_LIST |
Functions | |
NTSTATUS | SeCaptureObjectTypeList (IN POBJECT_TYPE_LIST ObjectTypeList OPTIONAL, IN ULONG ObjectTypeListLength, IN KPROCESSOR_MODE RequestorMode, OUT PIOBJECT_TYPE_LIST *CapturedObjectTypeList) |
VOID | SeFreeCapturedObjectTypeList (IN PVOID ObjectTypeList) |
NTSTATUS | SepAdjustGroups (IN PTOKEN Token, IN BOOLEAN MakeChanges, IN BOOLEAN ResetToDefault, IN ULONG GroupCount OPTIONAL, IN PSID_AND_ATTRIBUTES NewState OPTIONAL, OUT PTOKEN_GROUPS PreviousState OPTIONAL, OUT PSID SidBuffer OPTIONAL, OUT PULONG ReturnLength, OUT PULONG ChangeCount, OUT PBOOLEAN ChangesMade) |
NTSTATUS | SepAdjustPrivileges (IN PTOKEN Token, IN BOOLEAN MakeChanges, IN BOOLEAN DisableAllPrivileges, IN ULONG PrivilegeCount OPTIONAL, IN PLUID_AND_ATTRIBUTES NewState OPTIONAL, OUT PTOKEN_PRIVILEGES PreviousState OPTIONAL, OUT PULONG ReturnLength, OUT PULONG ChangeCount, OUT PBOOLEAN ChangesMade) |
VOID | SepAppendDefaultDacl (IN PTOKEN Token, IN PACL PAcl) |
VOID | SepAppendPrimaryGroup (IN PTOKEN Token, IN PSID PSid) |
NTSTATUS | SepDuplicateToken (IN PTOKEN ExistingToken, IN POBJECT_ATTRIBUTES ObjectAttributes, IN BOOLEAN EffectiveOnly, IN TOKEN_TYPE TokenType, IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel OPTIONAL, IN KPROCESSOR_MODE RequestorMode, OUT PTOKEN *DuplicateToken) |
NTSTATUS | SepFilterToken (IN PTOKEN ExistingToken, IN KPROCESSOR_MODE RequestorMode, IN ULONG Flags, IN ULONG GroupCount, IN PSID_AND_ATTRIBUTES GroupsToDisable OPTIONAL, IN ULONG PrivilegeCount, IN PLUID_AND_ATTRIBUTES PrivilegesToDelete OPTIONAL, IN ULONG SidCount, IN PSID_AND_ATTRIBUTES RestrictedSids OPTIONAL, IN ULONG SidLength, OUT PTOKEN *FilteredToken) |
BOOLEAN | SepSidInSidAndAttributes (IN PSID_AND_ATTRIBUTES SidAndAttributes, IN ULONG SidCount, IN PSID PrincipalSelfSid, IN PSID Sid) |
VOID | SepRemoveDisabledGroupsAndPrivileges (IN PTOKEN Token, IN ULONG Flags, IN ULONG GroupCount, IN PSID_AND_ATTRIBUTES GroupsToDisable, IN ULONG PrivilegeCount, IN PLUID_AND_ATTRIBUTES PrivilegesToDelete) |
VOID | SepFreeDefaultDacl (IN PTOKEN Token) |
VOID | SepFreePrimaryGroup (IN PTOKEN Token) |
BOOLEAN | SepIdAssignableAsOwner (IN PTOKEN Token, IN ULONG Index) |
VOID | SepMakeTokenEffectiveOnly (IN PTOKEN Token) |
BOOLEAN | SepTokenInitialization (VOID) |
VOID | SepTokenDeleteMethod (IN PVOID Token) |
BOOLEAN | SepPrivilegeCheck (IN PTOKEN Token, IN OUT PLUID_AND_ATTRIBUTES RequiredPrivileges, IN ULONG RequiredPrivilegeCount, IN ULONG PrivilegeSetControl, IN KPROCESSOR_MODE PreviousMode) |
VOID | SepAccessCheck (IN PSECURITY_DESCRIPTOR SecurityDescriptor, IN PSID PrincipalSelfSid, IN PTOKEN PrimaryToken, IN PTOKEN ClientToken OPTIONAL, IN ACCESS_MASK DesiredAccess, IN PIOBJECT_TYPE_LIST ObjectTypeList OPTIONAL, IN ULONG ObjectTypeListLength, IN PGENERIC_MAPPING GenericMapping, IN ACCESS_MASK PreviouslyGrantedAccess, IN KPROCESSOR_MODE PreviousMode, OUT PACCESS_MASK GrantedAccess, OUT PPRIVILEGE_SET *Privileges OPTIONAL, OUT PNTSTATUS AccessStatus, IN BOOLEAN ReturnResultList, OUT PBOOLEAN ReturnSomeAccessGranted, OUT PBOOLEAN ReturnSomeAccessDenied) |
BOOLEAN | SepObjectInTypeList (IN GUID *ObjectType, IN PIOBJECT_TYPE_LIST ObjectTypeList, IN ULONG ObjectTypeListLength, OUT PULONG ReturnedIndex) |
Variables | |
GENERIC_MAPPING | SepTokenMapping |
POBJECT_TYPE | SepTokenObjectType |
ERESOURCE | SepTokenLock |
|
|
|
Definition at line 377 of file tokenp.h. Referenced by SepAdtOpenObjectAuditAlarm(), SepAuditTypeList(), and SepSetAuditInfoForObjectType(). |
|
Definition at line 376 of file tokenp.h. Referenced by SepAdtOpenObjectAuditAlarm(), SepAuditTypeList(), and SepSetAuditInfoForObjectType(). |
|
Value:
Definition at line 413 of file tokenp.h. Referenced by NtDuplicateToken(), NtFilterToken(), NtQueryInformationToken(), SeAccessCheckByType(), SeFilterToken(), SeGetTokenControlInformation(), SeIsChildToken(), SeIsChildTokenByPointer(), SeLockSubjectContext(), SepDuplicateToken(), SepFilterToken(), SepIdAssignableAsGroup(), SepPrivilegeCheck(), SepTokenIsOwner(), SepValidOwnerSubjectContext(), SeQueryAuthenticationIdToken(), SeQueryInformationToken(), and SeQuerySessionIdToken(). |
|
Value:
Definition at line 416 of file tokenp.h. Referenced by NtAdjustGroupsToken(), NtAdjustPrivilegesToken(), NtSetInformationToken(), and SeSetSessionIdToken(). |
|
Definition at line 479 of file tokenp.h. Referenced by SepAdjustGroups(), and SepCreateToken(). |
|
Definition at line 460 of file tokenp.h. Referenced by SepAdjustPrivileges(). |
|
Value:
Definition at line 419 of file tokenp.h. Referenced by NtDuplicateToken(), NtFilterToken(), NtQueryInformationToken(), SeAccessCheckByType(), SeFilterToken(), SeGetTokenControlInformation(), SeIsChildToken(), SeIsChildTokenByPointer(), SepDuplicateToken(), SepFilterToken(), SepIdAssignableAsGroup(), SepPrivilegeCheck(), SepTokenIsOwner(), SepValidOwnerSubjectContext(), SeQueryAuthenticationIdToken(), SeQueryInformationToken(), SeQuerySessionIdToken(), and SeUnlockSubjectContext(). |
|
Value:
Definition at line 444 of file tokenp.h. Referenced by NtAdjustGroupsToken(), NtAdjustPrivilegesToken(), NtSetInformationToken(), and SeSetSessionIdToken(). |
|
Definition at line 489 of file tokenp.h. Referenced by SepAdjustGroups(), SepIdAssignableAsOwner(), and SepMakeTokenEffectiveOnly(). |
|
Definition at line 470 of file tokenp.h. Referenced by SepAdjustPrivileges(), and SepMakeTokenEffectiveOnly(). |
|
Definition at line 124 of file tokenp.h. Referenced by SepCreateToken(). |
|
|
|
|
|
Referenced by SeCaptureObjectTypeList(). |
|
|
|
|
|
Referenced by CmpParseInfBuffer(). |
|
Definition at line 144 of file accessck.c. References _IOBJECT_TYPE_LIST::CurrentDenied, _IOBJECT_TYPE_LIST::CurrentGranted, ExAllocatePoolWithTag, EXCEPTION_EXECUTE_HANDLER, ExFreePool(), _IOBJECT_TYPE_LIST::Flags, IOBJECT_TYPE_LIST, IsValidElementCount, _IOBJECT_TYPE_LIST::Level, NTSTATUS(), NULL, _IOBJECT_TYPE_LIST::ObjectType, PAGED_CODE, PagedPool, _IOBJECT_TYPE_LIST::ParentIndex, ProbeForRead, _IOBJECT_TYPE_LIST::Remaining, Status, UserMode, and USHORT. Referenced by SeAccessCheckByType(), and SepAccessCheckAndAuditAlarm().
|
|
Definition at line 353 of file accessck.c. References ExFreePool(), NULL, and PAGED_CODE. Referenced by SeAccessCheckByType(), and SepAccessCheckAndAuditAlarm().
|
|
Definition at line 1564 of file accessck.c. References ASSERT, ClientToken, _IOBJECT_TYPE_LIST::CurrentGranted, Dacl, FALSE, FirstAce, Index, NextAce, NT_SUCCESS, NTSTATUS(), NULL, PAGED_CODE, PrimaryToken, PTOKEN, _IOBJECT_TYPE_LIST::Remaining, SeAssertMappedCanonicalAccess, SepAddAccessTypeList(), SepAssemblePrivileges(), SepDumpSecurityDescriptor(), SepDumpTokenInfo(), SepMaximumAccessCheck(), SepNormalAccessCheck(), SepObjectInTypeList(), SepSidInToken(), SepSinglePrivilegeCheck(), SeSecurityPrivilege, SeTakeOwnershipPrivilege, SeTokenIsRestricted(), Status, TRUE, and UpdateRemaining. Referenced by SeAccessCheck(), SeAccessCheckByType(), and SepAccessCheckAndAuditAlarm().
|
|
Definition at line 1099 of file tokenadj.c. References ANYSIZE_ARRAY, ASSERT, FALSE, NTSTATUS(), PAGED_CODE, RtlCopySid(), RtlEqualSid(), SeLengthSid, SepArrayGroupAttributes, SepTokenGroupAttributes, Token, and TRUE. Referenced by NtAdjustGroupsToken().
|
|
Definition at line 819 of file tokenadj.c. References ANYSIZE_ARRAY, DisableAllPrivileges(), FALSE, NTSTATUS(), PAGED_CODE, RtlEqualLuid(), SeChangeNotifyPrivilege, SepArrayPrivilegeAttributes, SepTokenPrivilegeAttributes, Token, TOKEN_HAS_TRAVERSE_PRIVILEGE, and TRUE. Referenced by NtAdjustPrivilegesToken().
|
|
Definition at line 778 of file tokenset.c. References ASSERT, PAGED_CODE, SeLengthSid, and Token. Referenced by NtSetInformationToken().
|
|
Definition at line 697 of file tokenset.c. References ASSERT, PAGED_CODE, SeLengthSid, and Token. Referenced by NtSetInformationToken().
|
|
Definition at line 362 of file tokendup.c. References ASSERT, DbgPrint, ExAllocateLocallyUniqueId, ExAllocatePool, ExAllocatePoolWithTag, ExFreePool(), FALSE, Index, NT_SUCCESS, NTSTATUS(), NULL, ObCreateObject(), ObjectAttributes, PAGED_CODE, PagedPool, PTOKEN, SepAcquireTokenReadLock, SepCopyProxyData(), SepDeReferenceLogonSession(), SepFreeProxyData(), SepMakeTokenEffectiveOnly(), SepReferenceLogonSession(), SepReleaseTokenReadLock, SepTokenObjectType, and Status. Referenced by NtDuplicateToken(), NtOpenThreadToken(), SeCopyClientToken(), and SeSubProcessToken().
|
|
Definition at line 1939 of file tokendup.c. References ASSERT, DbgPrint, ExAllocateLocallyUniqueId, ExAllocatePool, ExAllocatePoolWithTag, ExFreePool(), FALSE, Index, MAX, NT_SUCCESS, NTSTATUS(), NULL, ObCreateObject(), ObDereferenceObject, PAGED_CODE, PagedPool, PTOKEN, RtlCopyLuidAndAttributesArray(), RtlCopySidAndAttributesArray(), SepAcquireTokenReadLock, SepCopyProxyData(), SepDeReferenceLogonSession(), SepFreeProxyData(), SepReferenceLogonSession(), SepReleaseTokenReadLock, SepRemoveDisabledGroupsAndPrivileges(), SepSidInSidAndAttributes(), SepTokenObjectType, Status, and TOKEN_IS_RESTRICTED. Referenced by NtFilterToken(), SeFastFilterToken(), and SeFilterToken().
|
|
Definition at line 635 of file tokenset.c. References NULL, PAGED_CODE, SeLengthSid, and Token. Referenced by NtSetInformationToken().
|
|
Definition at line 576 of file tokenset.c. References PAGED_CODE, SeLengthSid, and Token. Referenced by NtSetInformationToken().
|
|
Definition at line 2813 of file token.c. References Index, PAGED_CODE, SepTokenGroupAttributes, Token, and TRUE. Referenced by NtSetInformationToken(), and SepValidOwnerSubjectContext().
|
|
Definition at line 806 of file tokendup.c. References ASSERT, Index, PAGED_CODE, RtlEqualSid(), SeAliasAdminsSid, SepTokenGroupAttributes, SepTokenPrivilegeAttributes, Token, and TOKEN_HAS_ADMIN_GROUP. Referenced by SepDuplicateToken().
|
|
Definition at line 388 of file accessck.c. References ASSERT, FALSE, Index, PAGED_CODE, and TRUE. Referenced by SepAccessCheck(), SepExamineSaclEx(), SepMaximumAccessCheck(), and SepNormalAccessCheck().
|
|
Definition at line 38 of file privileg.c. References FALSE, KernelMode, PAGED_CODE, RtlEqualLuid(), SepAcquireTokenReadLock, SepReleaseTokenReadLock, Token, and TRUE. Referenced by NtPrivilegeCheck(), SeCheckAuditPrivilege(), SePrivilegeCheck(), and SepSinglePrivilegeCheck().
|
|
Definition at line 1041 of file tokendup.c. References ASSERT, FALSE, Index, NULL, PAGED_CODE, RtlEqualLuid(), RtlEqualSid(), SeAliasAdminsSid, SeChangeNotifyPrivilege, SepSidInSidAndAttributes(), Token, TOKEN_HAS_ADMIN_GROUP, TOKEN_HAS_TRAVERSE_PRIVILEGE, and TRUE. Referenced by SepFilterToken().
|
|
Definition at line 933 of file tokendup.c. References FALSE, NULL, PAGED_CODE, PTOKEN, RtlEqualSid(), SePrincipalSelfSid, Token, and TRUE. Referenced by SepFilterToken(), and SepRemoveDisabledGroupsAndPrivileges().
|
|
Definition at line 2156 of file token.c. References ExFreePool(), PAGED_CODE, SepDeReferenceLogonSession(), SepFreeProxyData(), and Token. Referenced by SepTokenInitialization().
|
|
Definition at line 1460 of file token.c. References ExInitializeResource, L, NT_SUCCESS, NTSTATUS(), NULL, ObCreateObjectType(), PAGED_CODE, PagedPool, RtlInitUnicodeString(), SepTokenDeleteMethod(), SepTokenLock, SepTokenMapping, SepTokenObjectType, Status, and TRUE. Referenced by SepInitializationPhase0().
|
|
Definition at line 674 of file tokenp.h. Referenced by SepTokenInitialization(). |
|
Definition at line 671 of file tokenp.h. Referenced by SepTokenInitialization(). |
|
|