#include "obp.h"
Go to the source code of this file.
Defines | |
#define | GENERIC_ACCESS (GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL) |
Functions | |
NTSTATUS | ObpIncrementHandleDataBase (IN POBJECT_HEADER ObjectHeader, IN PEPROCESS Process, OUT PULONG NewProcessHandleCount) |
NTSTATUS | ObpCaptureHandleInformation (IN OUT PSYSTEM_HANDLE_TABLE_ENTRY_INFO *HandleEntryInfo, IN HANDLE UniqueProcessId, IN PVOID HandleTableEntry, IN HANDLE HandleIndex, IN ULONG Length, IN OUT PULONG RequiredLength) |
NTSTATUS | NtDuplicateObject (IN HANDLE SourceProcessHandle, IN HANDLE SourceHandle, IN HANDLE TargetProcessHandle OPTIONAL, OUT PHANDLE TargetHandle OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG HandleAttributes, IN ULONG Options) |
NTSTATUS | ObGetHandleInformation (OUT PSYSTEM_HANDLE_INFORMATION HandleInformation, IN ULONG Length, OUT PULONG ReturnLength OPTIONAL) |
NTSTATUS | ObpCaptureHandleInformation (IN OUT PSYSTEM_HANDLE_TABLE_ENTRY_INFO *HandleEntryInfo, IN HANDLE UniqueProcessId, IN PHANDLE_TABLE_ENTRY ObjectTableEntry, IN HANDLE HandleIndex, IN ULONG Length, IN OUT PULONG RequiredLength) |
POBJECT_HANDLE_COUNT_ENTRY | ObpInsertHandleCount (POBJECT_HEADER ObjectHeader) |
NTSTATUS | ObpIncrementHandleCount (OB_OPEN_REASON OpenReason, PEPROCESS Process, PVOID Object, POBJECT_TYPE ObjectType, PACCESS_STATE AccessState OPTIONAL, KPROCESSOR_MODE AccessMode, ULONG Attributes) |
NTSTATUS | ObpIncrementUnnamedHandleCount (PACCESS_MASK DesiredAccess, PEPROCESS Process, PVOID Object, POBJECT_TYPE ObjectType, KPROCESSOR_MODE AccessMode, ULONG Attributes) |
NTSTATUS | ObpChargeQuotaForObject (IN POBJECT_HEADER ObjectHeader, IN POBJECT_TYPE ObjectType, OUT PBOOLEAN NewObject) |
VOID | ObpDecrementHandleCount (PEPROCESS Process, POBJECT_HEADER ObjectHeader, POBJECT_TYPE ObjectType, ACCESS_MASK GrantedAccess) |
NTSTATUS | ObpCreateHandle (IN OB_OPEN_REASON OpenReason, IN PVOID Object, IN POBJECT_TYPE ExpectedObjectType OPTIONAL, IN PACCESS_STATE AccessState, IN ULONG ObjectPointerBias OPTIONAL, IN ULONG Attributes, IN BOOLEAN DirectoryLocked, IN KPROCESSOR_MODE AccessMode, OUT PVOID *ReferencedNewObject OPTIONAL, OUT PHANDLE Handle) |
NTSTATUS | ObpCreateUnnamedHandle (IN PVOID Object, IN ACCESS_MASK DesiredAccess, IN ULONG ObjectPointerBias OPTIONAL, IN ULONG Attributes, IN KPROCESSOR_MODE AccessMode, OUT PVOID *ReferencedNewObject OPTIONAL, OUT PHANDLE Handle) |
NTSTATUS | ObpValidateDesiredAccess (IN ACCESS_MASK DesiredAccess) |
Variables | |
KMUTANT | ObpInitKillMutant |
|
Definition at line 27 of file obhandle.c. Referenced by NtDuplicateObject(), ObpIncrementHandleCount(), ObpIncrementUnnamedHandleCount(), and SeCreateAccessState(). |
|
Definition at line 163 of file obhandle.c. References ASSERT, AUX_ACCESS_DATA, _HANDLE_TABLE_ENTRY::CreatorBackTraceIndex, EXCEPTION_EXECUTE_HANDLER, ExCreateHandle(), Executive, FALSE, _ACCESS_STATE::GenerateOnClose, GENERIC_ACCESS, _OBJECT_TYPE_INITIALIZER::GenericMapping, _HANDLE_TABLE_ENTRY::GrantedAccess, _OBJECT_HANDLE_INFORMATION::GrantedAccess, _HANDLE_TABLE_ENTRY::GrantedAccessIndex, _OBJECT_HANDLE_INFORMATION::HandleAttributes, KeAttachProcess(), KeDetachProcess(), KeEnterCriticalRegion, KeLeaveCriticalRegion, KeReleaseMutant(), KernelMode, KeWaitForSingleObject(), KPROCESSOR_MODE, NT_SUCCESS, NtClose(), NtGlobalFlag, NTSTATUS(), NULL, _HANDLE_TABLE_ENTRY::ObAttributes, ObDereferenceObject, ObDuplicateHandle, OBJ_AUDIT_OBJECT_CLOSE, OBJ_HANDLE_ATTRIBUTES, _HANDLE_TABLE_ENTRY::Object, OBJECT_TO_OBJECT_HEADER, ObpDecrementHandleCount(), ObpGetObjectTable, ObpIncrementHandleCount(), ObpInitKillMutant, ObpValidateDesiredAccess(), ObReferenceObjectByHandle(), ProbeForWriteHandle, PsGetCurrentProcess, PsProcessType, RtlMapGenericMask(), SeAuditHandleCreation(), SeAuditHandleDuplication(), SeCreateAccessState(), _OBJECT_TYPE_INITIALIZER::SecurityProcedure, SeDefaultObjectMethod(), SeDeleteAccessState(), SeDetailedAuditing, Status, TRUE, _OBJECT_HEADER::Type, _OBJECT_TYPE::TypeInfo, and _OBJECT_TYPE_INITIALIZER::ValidAccessMask. Referenced by AllocateConsole(), ConsoleClientShutdown(), InitWindowsStuff(), PropertiesDlgShow(), PropertiesUpdate(), RtlpChangeQueryDebugBufferTarget(), RtlpIOWorkerThread(), RtlpWaitThread(), RtlpWorkerThread(), SepServerWaitForNextConnect(), SrvConsoleNotifyLastClose(), SrvRegisterConsoleVDM(), SrvSetConsoleCP(), SrvSetConsoleDisplayMode(), and TestTokenCreate().
|
|
Definition at line 745 of file obhandle.c. References ExSnapShotHandleTables(), NTSTATUS(), ObpCaptureHandleInformation(), PAGED_CODE, and Status. Referenced by ExpGetHandleInformation().
|
|
Definition at line 807 of file obhandle.c. References _OBJECT_HEADER::Body, _OBJECT_TYPE::Index, NtGlobalFlag, NTSTATUS(), OBJ_HANDLE_ATTRIBUTES, Status, _OBJECT_HEADER::Type, and USHORT.
|
|
Referenced by ObGetHandleInformation(). |
|
Definition at line 1861 of file obhandle.c. References FALSE, _OBJECT_HEADER_QUOTA_INFO::NonPagedPoolCharge, NULL, OB_FLAG_DEFAULT_SECURITY_QUOTA, OB_FLAG_NEW_OBJECT, OBJECT_HEADER_TO_QUOTA_INFO, _OBJECT_HEADER_QUOTA_INFO::PagedPoolCharge, PsChargeSharedPoolQuota(), PsGetCurrentProcess, SE_DEFAULT_SECURITY_QUOTA, _OBJECT_HEADER_QUOTA_INFO::SecurityDescriptorCharge, and TRUE. Referenced by ObpIncrementHandleCount(), and ObpIncrementUnnamedHandleCount().
|
|
Definition at line 2160 of file obhandle.c. References _HANDLE_TABLE_ENTRY::CreatorBackTraceIndex, EncodeKernelHandle, ExCreateHandle(), FALSE, _HANDLE_TABLE_ENTRY::GrantedAccess, _HANDLE_TABLE_ENTRY::GrantedAccessIndex, Handle, KernelMode, KeStackAttachProcess(), KeUnstackDetachProcess(), NT_SUCCESS, NtGlobalFlag, NTSTATUS(), NULL, _HANDLE_TABLE_ENTRY::ObAttributes, ObCreateHandle, OBJ_AUDIT_OBJECT_CLOSE, OBJ_HANDLE_ATTRIBUTES, _HANDLE_TABLE_ENTRY::Object, OBJECT_TO_OBJECT_HEADER, ObpDecrementHandleCount(), ObpDecrPointerCount, ObpGetObjectTable, ObpIncrementHandleCount(), ObpIncrPointerCount, ObpKernelHandleTable, ObpLeaveRootDirectoryMutex, ObpValidateIrql, PAGED_CODE, PAUX_ACCESS_DATA, _EPROCESS::Pcb, _AUX_ACCESS_DATA::PrivilegesUsed, PsGetCurrentProcess, PsInitialSystemProcess, SeAuditHandleCreation(), SePrivilegeObjectAuditAlarm(), Status, TRUE, _OBJECT_HEADER::Type, _OBJECT_TYPE::TypeInfo, and _OBJECT_TYPE_INITIALIZER::ValidAccessMask. Referenced by ObInsertObject(), ObOpenObjectByName(), and ObOpenObjectByPointer().
|
|
Definition at line 2507 of file obhandle.c. References _HANDLE_TABLE_ENTRY::CreatorBackTraceIndex, EncodeKernelHandle, ExCreateHandle(), FALSE, _HANDLE_TABLE_ENTRY::GrantedAccess, _HANDLE_TABLE_ENTRY::GrantedAccessIndex, Handle, KernelMode, KeStackAttachProcess(), KeUnstackDetachProcess(), NT_SUCCESS, NtGlobalFlag, NTSTATUS(), NULL, _HANDLE_TABLE_ENTRY::ObAttributes, OBJ_HANDLE_ATTRIBUTES, _HANDLE_TABLE_ENTRY::Object, OBJECT_TO_OBJECT_HEADER, ObpDecrementHandleCount(), ObpDecrPointerCount, ObpGetObjectTable, ObpIncrementUnnamedHandleCount(), ObpIncrPointerCount, ObpKernelHandleTable, ObpValidateIrql, PAGED_CODE, _EPROCESS::Pcb, PsGetCurrentProcess, PsInitialSystemProcess, Status, TRUE, _OBJECT_HEADER::Type, _OBJECT_TYPE::TypeInfo, and _OBJECT_TYPE_INITIALIZER::ValidAccessMask. Referenced by ObInsertObject().
|
|
Definition at line 1967 of file obhandle.c. References ASSERT, _OBJECT_HEADER::Body, _OBJECT_TYPE_INITIALIZER::CloseProcedure, _OBJECT_HANDLE_COUNT_DATABASE::CountEntries, FALSE, _OBJECT_HEADER::Flags, _OBJECT_HEADER::HandleCount, _OBJECT_HANDLE_COUNT_ENTRY::HandleCount, _OBJECT_HEADER_HANDLE_INFO::HandleCountDataBase, _OBJECT_HANDLE_COUNT_DATABASE::HandleCountEntries, _OBJECT_TYPE_INITIALIZER::MaintainHandleCount, NULL, OB_FLAG_EXCLUSIVE_OBJECT, OB_FLAG_SINGLE_HANDLE_ENTRY, OBJECT_HEADER_TO_CREATOR_INFO, OBJECT_HEADER_TO_HANDLE_INFO, OBJECT_HEADER_TO_QUOTA_INFO, ObpBeginTypeSpecificCallOut, ObpDecrHandleCount, ObpDeleteNameCheck(), ObpEndTypeSpecificCallOut, ObpEnterObjectTypeMutex, ObpLeaveObjectTypeMutex, PAGED_CODE, _OBJECT_HANDLE_COUNT_ENTRY::Process, _OBJECT_HEADER_HANDLE_INFO::SingleEntry, _OBJECT_TYPE::TotalNumberOfHandles, TRUE, _OBJECT_TYPE::TypeInfo, and _OBJECT_HEADER_CREATOR_INFO::TypeList. Referenced by NtClose(), NtDuplicateObject(), ObpCreateHandle(), and ObpCreateUnnamedHandle().
|
|
Definition at line 1232 of file obhandle.c. References _OBJECT_TYPE_INITIALIZER::CloseProcedure, EXCEPTION_EXECUTE_HANDLER, FALSE, _OBJECT_HEADER::Flags, GENERIC_ACCESS, _OBJECT_TYPE_INITIALIZER::GenericMapping, _OBJECT_HEADER::HandleCount, _OBJECT_TYPE::HighWaterNumberOfHandles, _OBJECT_TYPE_INITIALIZER::MaintainHandleCount, NT_SUCCESS, NTSTATUS(), NULL, OB_FLAG_EXCLUSIVE_OBJECT, ObCheckObjectAccess(), ObCreateHandle, ObDuplicateHandle, OBJECT_HEADER_TO_CREATOR_INFO, OBJECT_HEADER_TO_EXCLUSIVE_PROCESS, OBJECT_HEADER_TO_QUOTA_INFO, OBJECT_TO_OBJECT_HEADER, ObOpenHandle, ObpBeginTypeSpecificCallOut, ObpChargeQuotaForObject(), ObpDecrHandleCount, ObpEndTypeSpecificCallOut, ObpEnterObjectTypeMutex, ObpIncrementHandleDataBase(), ObpIncrHandleCount, ObpLeaveObjectTypeMutex, ObpValidateIrql, _OBJECT_TYPE_INITIALIZER::OpenProcedure, PAGED_CODE, PsGetCurrentProcess, RtlMapGenericMask(), SeAppendPrivileges(), SePrivilegeCheck(), SePrivilegedServiceAuditAlarm(), SeSecurityPrivilege, Status, _OBJECT_TYPE::TotalNumberOfHandles, TRUE, _OBJECT_TYPE::TypeInfo, _OBJECT_TYPE::TypeList, _OBJECT_HEADER_CREATOR_INFO::TypeList, and VOID(). Referenced by NtDuplicateObject(), ObDupHandleProcedure(), and ObpCreateHandle().
|
|
Definition at line 1058 of file obhandle.c. References _OBJECT_HANDLE_COUNT_DATABASE::CountEntries, _OBJECT_HANDLE_COUNT_ENTRY::HandleCount, _OBJECT_HEADER_HANDLE_INFO::HandleCountDataBase, _OBJECT_HANDLE_COUNT_DATABASE::HandleCountEntries, NULL, OB_FLAG_SINGLE_HANDLE_ENTRY, OBJECT_HEADER_TO_HANDLE_INFO, ObpInsertHandleCount(), PAGED_CODE, _OBJECT_HANDLE_COUNT_ENTRY::Process, and _OBJECT_HEADER_HANDLE_INFO::SingleEntry. Referenced by ObpIncrementHandleCount(), and ObpIncrementUnnamedHandleCount().
|
|
Definition at line 1587 of file obhandle.c. References _OBJECT_TYPE_INITIALIZER::CloseProcedure, EXCEPTION_EXECUTE_HANDLER, FALSE, _OBJECT_HEADER::Flags, GENERIC_ACCESS, _OBJECT_TYPE_INITIALIZER::GenericMapping, _OBJECT_HEADER::HandleCount, _OBJECT_TYPE::HighWaterNumberOfHandles, _OBJECT_TYPE_INITIALIZER::MaintainHandleCount, NT_SUCCESS, NTSTATUS(), NULL, OB_FLAG_EXCLUSIVE_OBJECT, ObCreateHandle, OBJECT_HEADER_TO_CREATOR_INFO, OBJECT_HEADER_TO_EXCLUSIVE_PROCESS, OBJECT_HEADER_TO_QUOTA_INFO, OBJECT_TO_OBJECT_HEADER, ObpBeginTypeSpecificCallOut, ObpChargeQuotaForObject(), ObpDecrHandleCount, ObpEndTypeSpecificCallOut, ObpEnterObjectTypeMutex, ObpIncrementHandleDataBase(), ObpIncrHandleCount, ObpLeaveObjectTypeMutex, ObpValidateIrql, _OBJECT_TYPE_INITIALIZER::OpenProcedure, PAGED_CODE, PsGetCurrentProcess, RtlMapGenericMask(), Status, _OBJECT_TYPE::TotalNumberOfHandles, TRUE, _OBJECT_TYPE::TypeInfo, _OBJECT_TYPE::TypeList, _OBJECT_HEADER_CREATOR_INFO::TypeList, and VOID(). Referenced by ObpCreateUnnamedHandle().
|
|
Definition at line 908 of file obhandle.c. References _OBJECT_HANDLE_COUNT_DATABASE::CountEntries, ExAllocatePoolWithTag, ExFreePool(), _OBJECT_HEADER::Flags, _OBJECT_HEADER_HANDLE_INFO::HandleCountDataBase, _OBJECT_HANDLE_COUNT_DATABASE::HandleCountEntries, NULL, OB_FLAG_SINGLE_HANDLE_ENTRY, OBJECT_HEADER_TO_HANDLE_INFO, PAGED_CODE, PagedPool, and _OBJECT_HEADER_HANDLE_INFO::SingleEntry. Referenced by ObpIncrementHandleDataBase().
|
|
Definition at line 2752 of file obhandle.c. Referenced by NtDuplicateObject().
|
|
Definition at line 34 of file obhandle.c. Referenced by NtDuplicateObject(), NtQueryInformationProcess(), ObFindHandleForObject(), ObInitProcess(), ObInitSystem(), and ObKillProcess(). |