#include "sep.h"
#include "sertlp.h"
#include <zwapi.h>
#include "tokenp.h"
Go to the source code of this file.
Functions | |
TOKEN_TYPE | SeTokenType (IN PACCESS_TOKEN Token) |
NTKERNELAPI BOOLEAN | SeTokenIsAdmin (IN PACCESS_TOKEN Token) |
NTKERNELAPI BOOLEAN | SeTokenIsRestricted (IN PACCESS_TOKEN Token) |
SECURITY_IMPERSONATION_LEVEL | SeTokenImpersonationLevel (IN PACCESS_TOKEN Token) |
VOID | SeAssignPrimaryToken (IN PEPROCESS Process, IN PACCESS_TOKEN Token) |
VOID | SeDeassignPrimaryToken (IN PEPROCESS Process) |
NTSTATUS | SeExchangePrimaryToken (IN PEPROCESS Process, IN PACCESS_TOKEN NewAccessToken, OUT PACCESS_TOKEN *OldAccessToken) |
VOID | SeGetTokenControlInformation (IN PACCESS_TOKEN Token, OUT PTOKEN_CONTROL TokenControl) |
PACCESS_TOKEN | SeMakeSystemToken () |
PACCESS_TOKEN | SeMakeAnonymousLogonToken (VOID) |
NTSTATUS | SeSubProcessToken (IN PEPROCESS ParentProcess, OUT PACCESS_TOKEN *ChildToken) |
BOOLEAN | SepTokenInitialization (VOID) |
NTSTATUS | NtCreateToken (OUT PHANDLE TokenHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN TOKEN_TYPE TokenType, IN PLUID AuthenticationId, IN PLARGE_INTEGER ExpirationTime, IN PTOKEN_USER User, IN PTOKEN_GROUPS Groups, IN PTOKEN_PRIVILEGES Privileges, IN PTOKEN_OWNER Owner OPTIONAL, IN PTOKEN_PRIMARY_GROUP PrimaryGroup, IN PTOKEN_DEFAULT_DACL DefaultDacl OPTIONAL, IN PTOKEN_SOURCE TokenSource) |
VOID | SepTokenDeleteMethod (IN PVOID Token) |
NTSTATUS | SepCreateToken (OUT PHANDLE TokenHandle, IN KPROCESSOR_MODE RequestorMode, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN TOKEN_TYPE TokenType, IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel OPTIONAL, 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 ULONG PrivilegesLength, IN PSID Owner OPTIONAL, IN PSID PrimaryGroup, IN PACL DefaultDacl OPTIONAL, IN PTOKEN_SOURCE TokenSource, IN BOOLEAN SystemToken, IN PSECURITY_TOKEN_PROXY_DATA ProxyData OPTIONAL, IN PSECURITY_TOKEN_AUDIT_DATA AuditData OPTIONAL) |
BOOLEAN | SepIdAssignableAsOwner (IN PTOKEN Token, IN ULONG Index) |
NTSTATUS | SeIsChildToken (IN HANDLE Token, OUT PBOOLEAN IsChild) |
NTSTATUS | SeIsChildTokenByPointer (IN PACCESS_TOKEN Token, OUT PBOOLEAN IsChild) |
NTSTATUS | NtImpersonateAnonymousToken (IN HANDLE ThreadHandle) |
Variables | |
GENERIC_MAPPING | SepTokenMapping |
POBJECT_TYPE | SepTokenObjectType |
ERESOURCE | SepTokenLock |
|
Definition at line 1690 of file token.c. References EXCEPTION_EXECUTE_HANDLER, FALSE, KernelMode, KPROCESSOR_MODE, NonPagedPool, NT_SUCCESS, NTSTATUS(), NULL, ObjectAttributes, Owner, PAGED_CODE, PagedPool, ProbeForRead, ProbeForWriteHandle, RtlCopyLuid(), SeCaptureAcl(), SeCaptureLuidAndAttributesArray(), SeCaptureSecurityQos(), SeCaptureSid(), SeCaptureSidAndAttributesArray(), SeFreeCapturedSecurityQos(), SepCreateToken(), SeReleaseAcl(), SeReleaseLuidAndAttributesArray(), SeReleaseSid(), SeReleaseSidAndAttributesArray(), Status, and TRUE. Referenced by CreateDAclToken(), TestTokenAssignPrimary(), and TestTokenCreate().
|
|
Definition at line 3038 of file token.c. References FALSE, NT_SUCCESS, NTSTATUS(), NULL, ObDereferenceObject, ObReferenceObjectByHandle(), ObReferenceObjectByPointer(), PsImpersonateClient(), PsThreadType, SeAnonymousLogonToken, SepTokenObjectType, Status, ThreadHandle, and TRUE.
|
|
Definition at line 241 of file token.c. References ASSERT, NTSTATUS(), NULL, ObReferenceObject, PAGED_CODE, PTOKEN, SeDeassignPrimaryToken(), Status, Token, and TRUE. Referenced by PspInitializeProcessSecurity().
|
|
Definition at line 302 of file token.c. References ASSERT, FALSE, ObDereferenceObject, PAGED_CODE, and PTOKEN. Referenced by PspDeleteProcessSecurity(), and SeAssignPrimaryToken().
|
|
Definition at line 346 of file token.c. References ASSERT, FALSE, NTSTATUS(), ObReferenceObject, PAGED_CODE, PTOKEN, Status, and TRUE. Referenced by PspAssignPrimaryToken().
|
|
Definition at line 475 of file token.c. References PAGED_CODE, PTOKEN, SepAcquireTokenReadLock, SepReleaseTokenReadLock, and Token. Referenced by SepCreateClientSecurity().
|
|
Definition at line 2867 of file token.c. References FALSE, IsChild(), NT_SUCCESS, NTSTATUS(), NULL, ObDereferenceObject, ObReferenceObjectByHandle(), PsDereferencePrimaryToken, PsGetCurrentProcess, PsReferencePrimaryToken(), PTOKEN, RtlEqualLuid(), SepAcquireTokenReadLock, SepReleaseTokenReadLock, SepTokenObjectType, Status, Token, and TRUE.
|
|
Definition at line 2960 of file token.c. References FALSE, IsChild(), NTSTATUS(), PsDereferencePrimaryToken, PsGetCurrentProcess, PsReferencePrimaryToken(), PTOKEN, RtlEqualLuid(), SepAcquireTokenReadLock, SepReleaseTokenReadLock, Status, Token, and TRUE. Referenced by NtSetInformationJobObject(), and PspSetPrimaryToken().
|
|
Definition at line 1010 of file token.c. References ASSERT, Buffer, DbgPrint, ExAllocatePoolWithTag, ExFreePool(), FALSE, KernelMode, NoExpiration, NormalGroupAttributes, NT_SUCCESS, NTSTATUS(), NULL, ObAssignObjectSecurityDescriptor(), ObDereferenceObject, Owner, PAGED_CODE, PagedPool, RtlAbsoluteToSelfRelativeSD(), RtlAddAccessAllowedAce(), RtlCreateAcl(), RtlCreateSecurityDescriptor(), RtlSetDaclSecurityDescriptor(), RtlSetGroupSecurityDescriptor(), RtlSetOwnerSecurityDescriptor(), RtlTimeFieldsToTime(), SeAliasAdminsSid, SeAnonymousAuthenticationId, SeAnonymousLogonSid, SeLengthSid, SepCreateToken(), SeSystemTokenSource, SeWorldSid, Status, TimeFields, Token, and TRUE.
|
|
Definition at line 536 of file token.c. References ASSERT, Buffer, DbgPrint, ExAllocatePoolWithTag, ExFreePool(), FALSE, KernelMode, NoExpiration, NormalGroupAttributes, NT_SUCCESS, NTSTATUS(), NULL, ObAssignObjectSecurityDescriptor(), ObDereferenceObject, Owner, OwnerGroupAttributes, PAGED_CODE, PagedPool, RtlAbsoluteToSelfRelativeSD(), RtlAddAccessAllowedAce(), RtlCreateAcl(), RtlCreateSecurityDescriptor(), RtlSetDaclSecurityDescriptor(), RtlSetGroupSecurityDescriptor(), RtlSetOwnerSecurityDescriptor(), RtlTimeFieldsToTime(), SeAliasAdminsSid, SeAssignPrimaryTokenPrivilege, SeAuditPrivilege, SeAuthenticatedUsersSid, SeBackupPrivilege, SeChangeNotifyPrivilege, SeCreatePagefilePrivilege, SeCreatePermanentPrivilege, SeCreateTokenPrivilege, SeDebugPrivilege, SeIncreaseBasePriorityPrivilege, SeIncreaseQuotaPrivilege, SeLengthSid, SeLoadDriverPrivilege, SeLocalSystemSid, SeLockMemoryPrivilege, SepCreateToken(), SeProfileSingleProcessPrivilege, SeRestorePrivilege, SeSecurityPrivilege, SeShutdownPrivilege, SeSystemAuthenticationId, SeSystemDefaultDacl, SeSystemEnvironmentPrivilege, SeSystemtimePrivilege, SeSystemTokenSource, SeTakeOwnershipPrivilege, SeTcbPrivilege, SeUndockPrivilege, SeWorldSid, Status, TimeFields, Token, and TRUE. Referenced by SepInitializationPhase0(), and TestMakeSystemToken().
|
|
Definition at line 2213 of file token.c. References ALIGN_UP, ASSERT, ExAllocateLocallyUniqueId, ExAllocatePool, ExAllocatePoolWithTag, FALSE, _OBJECT_TYPE_INITIALIZER::GenericMapping, NT_SUCCESS, NTSTATUS(), NULL, ObCreateObject(), ObDeleteCapturedInsertInfo(), ObDereferenceObject, ObInsertObject(), ObjectAttributes, Owner, PAGED_CODE, PagedPool, PTOKEN, RtlCopySid(), RtlCopySidAndAttributesArray(), RtlEqualLuid(), RtlEqualSid(), RtlLengthRequiredSid(), SeAliasAdminsSid, SeChangeNotifyPrivilege, SeCreateAccessState(), SeCreateTokenPrivilege, SeDeleteAccessState(), SepArrayGroupAttributes, SepCopyProxyData(), SepDeReferenceLogonSession(), SepReferenceLogonSession(), SepTokenObjectType, SeSinglePrivilegeCheck(), Status, Token, TOKEN_DEFAULT_DYNAMIC_CHARGE, TOKEN_HAS_ADMIN_GROUP, TOKEN_HAS_TRAVERSE_PRIVILEGE, TRUE, _OBJECT_TYPE::TypeInfo, and UserMode. Referenced by NtCreateToken(), SeMakeAnonymousLogonToken(), and SeMakeSystemToken().
|
|
Definition at line 2813 of file token.c. References Index, PAGED_CODE, SepTokenGroupAttributes, Token, and TRUE. Referenced by NtSetInformationToken(), and SepValidOwnerSubjectContext().
|
|
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 1327 of file token.c. References DbgPrint, FALSE, KernelMode, KPROCESSOR_MODE, NT_SUCCESS, NTSTATUS(), NULL, ObInsertObject(), PAGED_CODE, PrimaryTokenAttributes, PsDereferencePrimaryToken, PsReferencePrimaryToken(), PTOKEN, SepDuplicateToken(), Status, and TRUE. Referenced by PspInitializeProcessSecurity().
|
|
Definition at line 211 of file token.c. References PAGED_CODE, PTOKEN, and Token. Referenced by PsAssignImpersonationToken().
|
|
Definition at line 150 of file token.c. References PAGED_CODE, PTOKEN, Token, and TOKEN_HAS_ADMIN_GROUP. Referenced by NtAssignProcessToJobObject(), NtSetInformationJobObject(), PsAssignImpersonationToken(), and PsImpersonateClient().
|
|
Definition at line 181 of file token.c. References PAGED_CODE, PTOKEN, Token, and TOKEN_IS_RESTRICTED. Referenced by IsRestricted(), PsAssignImpersonationToken(), PsImpersonateClient(), and SepAccessCheck().
|
|
Definition at line 118 of file token.c. References PAGED_CODE, PTOKEN, and Token. Referenced by PsAssignImpersonationToken().
|
|
Definition at line 93 of file token.c. Referenced by SepTokenInitialization(). |
|
Initial value:
Definition at line 67 of file token.c. Referenced by SepTokenInitialization(). |
|
|