#include "sep.h"
#include "tokenp.h"
Go to the source code of this file.
Defines | |
#define | MAX(_x_, _y_) ((_x_) > (_y_) ? (_x_) : (_y_)) |
Functions | |
NTSTATUS | NtDuplicateToken (IN HANDLE ExistingTokenHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN BOOLEAN EffectiveOnly, IN TOKEN_TYPE TokenType, OUT PHANDLE NewTokenHandle) |
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) |
VOID | SepMakeTokenEffectiveOnly (IN PTOKEN Token) |
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) |
NTSTATUS | SeCopyClientToken (IN PACCESS_TOKEN ClientToken, IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, IN KPROCESSOR_MODE RequestorMode, OUT PACCESS_TOKEN *DuplicateToken) |
NTSTATUS | NtFilterToken (IN HANDLE ExistingTokenHandle, IN ULONG Flags, IN PTOKEN_GROUPS SidsToDisable OPTIONAL, IN PTOKEN_PRIVILEGES PrivilegesToDelete OPTIONAL, IN PTOKEN_GROUPS RestrictedSids OPTIONAL, OUT PHANDLE NewTokenHandle) |
NTSTATUS | SeFilterToken (IN PACCESS_TOKEN ExistingToken, IN ULONG Flags, IN PTOKEN_GROUPS SidsToDisable OPTIONAL, IN PTOKEN_PRIVILEGES PrivilegesToDelete OPTIONAL, IN PTOKEN_GROUPS RestrictedSids OPTIONAL, OUT PACCESS_TOKEN *NewToken) |
NTSTATUS | SeFastFilterToken (IN PACCESS_TOKEN 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 PACCESS_TOKEN *FilteredToken) |
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) |
|
Referenced by SepFilterToken(), and xxxDrawCaptionBar(). |
|
Definition at line 46 of file tokendup.c. References ASSERT, DbgPrint, EXCEPTION_EXECUTE_HANDLER, FALSE, _OBJECT_HANDLE_INFORMATION::GrantedAccess, KernelMode, KPROCESSOR_MODE, NT_SUCCESS, NTSTATUS(), NULL, ObDereferenceObject, ObInsertObject(), ObjectAttributes, ObReferenceObjectByHandle(), PAGED_CODE, ProbeForWriteHandle, PTOKEN, SeCaptureSecurityQos(), SecurityQos, SeFreeCapturedSecurityQos(), SepAcquireTokenReadLock, SepDuplicateToken(), SepReleaseTokenReadLock, SepTokenObjectType, Status, and Token. Referenced by main(), RtlImpersonateSelf(), TestTokenDuplicate(), and TestTokenImpersonation().
|
|
Definition at line 1306 of file tokendup.c. References DbgPrint, EXCEPTION_EXECUTE_HANDLER, _OBJECT_HANDLE_INFORMATION::GrantedAccess, Index, KPROCESSOR_MODE, NT_SUCCESS, NTSTATUS(), NULL, ObDereferenceObject, ObInsertObject(), ObReferenceObjectByHandle(), PAGED_CODE, PagedPool, ProbeForRead, ProbeForWriteHandle, PTOKEN, SeCaptureLuidAndAttributesArray(), SeCaptureSidAndAttributesArray(), SepAcquireTokenReadLock, SepFilterToken(), SepReleaseTokenReadLock, SepTokenObjectType, SeReleaseLuidAndAttributesArray(), SeReleaseSidAndAttributesArray(), Status, Token, and TRUE. Referenced by TestTokenFilter().
|
|
Definition at line 1227 of file tokendup.c. References ClientToken, FALSE, NTSTATUS(), NULL, ObjectAttributes, PAGED_CODE, PTOKEN, SepDuplicateToken(), and Status. Referenced by SepCreateClientSecurity().
|
|
Definition at line 1859 of file tokendup.c. References PTOKEN, and SepFilterToken(). Referenced by PsAssignImpersonationToken(), and PsImpersonateClient().
|
|
Definition at line 1634 of file tokendup.c. References DbgPrint, Index, KernelMode, KPROCESSOR_MODE, NT_SUCCESS, NtClose(), NTSTATUS(), NULL, ObInsertObject(), ObReferenceObjectByHandle(), PAGED_CODE, PTOKEN, SepAcquireTokenReadLock, SepFilterToken(), SepReleaseTokenReadLock, SepTokenObjectType, Status, Token, and VOID().
|
|
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 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 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().
|