37 (
PVOID*)&DirectoryObject,
41 DPRINT(
"ObReferenceObjectByHandle() failed (Status 0x%08lx)\n",
Status);
49 if (DeviceMap ==
NULL)
70 NewDeviceMap = DeviceMap;
124 if (HeaderNameInfo !=
NULL)
131 if (NewDeviceMap !=
NULL)
138 if (OldDeviceMap !=
NULL)
162 (
PVOID*)&DirectoryObject,
166 DPRINT(
"ObReferenceObjectByHandle() failed (Status 0x%08lx)\n",
Status);
174 if (LocalMap ==
NULL)
195 NewDeviceMap = LocalMap;
214 if (DeviceMap !=
NULL)
216 *DeviceMap = LocalMap;
230 if (HeaderNameInfo !=
NULL)
236 if (NewDeviceMap !=
NULL)
290 if (DeviceMap ==
NULL)
300 OldDeviceMap = CurrentProcess->
DeviceMap;
310 if (OldDeviceMap !=
NULL)
337 LookingForSystem =
FALSE;
379 if (DeviceMap !=
NULL)
388 if (DeviceMap !=
NULL)
398 LookingForSystem =
TRUE;
424 if (LookingForSystem)
435 if (DeviceMap !=
NULL)
460 DPRINT(
"ObDereferenceDeviceMap()\n");
465 DeviceMap =
Process->DeviceMap;
470 if (DeviceMap !=
NULL)
479 DPRINT(
"ObfDereferenceDeviceMap()\n");
485 DeviceMap->ReferenceCount--;
486 DPRINT(
"ReferenceCount: %lu\n", DeviceMap->ReferenceCount);
489 if (DeviceMap->ReferenceCount != 0)
497 DeviceMap->DosDevicesDirectory->DeviceMap =
NULL;
516 DPRINT(
"ObInheritDeviceMap()\n");
529 Process->DeviceMap = DeviceMap;
581 if (DeviceMap !=
NULL)
592 if (DeviceMap ==
NULL)
602 GlobalDeviceMap = DeviceMap;
614 for (
i = 0, BitMask = 1;
i < 32; ++
i, BitMask *= 2)
624 if (!(MapInfo.
Query.DriveMap & BitMask) && ReturnAny)
630 MapInfo.
Query.DriveType[
i] = GlobalDeviceMap->DriveType[
i];
631 MapInfo.
Query.DriveMap |= BitMask & GlobalDeviceMap->DriveMap;
671ObIsDosDeviceLocallyMapped(
676 if (Index < 1 || Index > 26)
static HANDLE DirectoryHandle
#define ObpDirectoryObjectType
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE Parent
NTSTATUS NTAPI ObpSetCurrentProcessDeviceMap(VOID)
PDEVICE_MAP NTAPI ObpReferenceDeviceMap(VOID)
VOID NTAPI ObInheritDeviceMap(IN PEPROCESS Parent, IN PEPROCESS Process)
NTSTATUS NTAPI ObSetDirectoryDeviceMap(OUT PDEVICE_MAP *DeviceMap, IN HANDLE DirectoryHandle)
VOID NTAPI ObDereferenceDeviceMap(IN PEPROCESS Process)
NTSTATUS NTAPI ObSetDeviceMap(IN PEPROCESS Process, IN HANDLE DirectoryHandle)
ULONG NTAPI ObIsLUIDDeviceMapsEnabled(VOID)
NTSTATUS NTAPI ObQueryDeviceMapInformation(_In_opt_ PEPROCESS Process, _Out_ PPROCESS_DEVICEMAP_INFORMATION DeviceMapInfo, _In_ ULONG Flags)
ULONG ObpLUIDDeviceMapsEnabled
VOID FASTCALL ObfDereferenceDeviceMap(IN PDEVICE_MAP DeviceMap)
ULONG ObpLUIDDeviceMapsDisabled
#define NT_SUCCESS(StatCode)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define PsGetCurrentThread()
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
VOID FASTCALL KeReleaseGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
VOID FASTCALL KeAcquireGuardedMutex(IN PKGUARDED_MUTEX GuardedMutex)
#define EXCEPTION_EXECUTE_HANDLER
#define PROCESS_LUID_DOSDEVICES_ONLY
enum _SECURITY_IMPERSONATION_LEVEL SECURITY_IMPERSONATION_LEVEL
#define ExFreePoolWithTag(_P, _T)
#define KeGetPreviousMode()
#define OB_FLAG_PERMANENT
#define DOSDEVICE_DRIVE_CALCULATE
#define DOSDEVICE_DRIVE_REMOTE
#define OBJECT_TO_OBJECT_HEADER(o)
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_ BOOLEAN EffectiveOnly
#define DIRECTORY_TRAVERSE
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE _In_ ULONG _In_ ULONG _In_opt_ PTOKEN_GROUPS _In_ PTOKEN_SOURCE _Out_ PVOID _Out_ PULONG _Inout_ PLUID LogonId
NTSTATUS NTAPI SeGetLogonIdDeviceMap(_In_ PLUID LogonId, _Out_ PDEVICE_MAP *DeviceMap)
Retrieves the DOS device map from a logon session.
PACCESS_TOKEN NTAPI PsReferencePrimaryToken(PEPROCESS Process)
PACCESS_TOKEN NTAPI PsReferenceImpersonationToken(IN PETHREAD Thread, OUT PBOOLEAN CopyOnOpen, OUT PBOOLEAN EffectiveOnly, OUT PSECURITY_IMPERSONATION_LEVEL ImpersonationLevel)
NTSTATUS NTAPI SeQueryAuthenticationIdToken(_In_ PACCESS_TOKEN Token, _Out_ PLUID LogonId)
Queries the authentication ID of an access token.
#define STATUS_OBJECT_PATH_INVALID
KGUARDED_MUTEX ObpDeviceMapLock
FORCEINLINE VOID ObpLeaveObjectTypeMutex(IN POBJECT_TYPE ObjectType)
FORCEINLINE VOID ObpDereferenceNameInfo(IN POBJECT_HEADER_NAME_INFO HeaderNameInfo)
FORCEINLINE POBJECT_HEADER_NAME_INFO ObpReferenceNameInfo(IN POBJECT_HEADER ObjectHeader)
FORCEINLINE VOID ObpEnterObjectTypeMutex(IN POBJECT_TYPE ObjectType)
PDEVICE_MAP ObSystemDeviceMap
VOID NTAPI ObMakeTemporaryObject(IN PVOID ObjectBody)
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define STATUS_END_OF_FILE
POBJECT_DIRECTORY DosDevicesDirectory
POBJECT_DIRECTORY GlobalDosDevicesDirectory
ULONG ActiveImpersonationInfo
struct _DEVICE_MAP * DeviceMap
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define STATUS_INVALID_PARAMETER
#define STATUS_INSUFFICIENT_RESOURCES
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ ULONG Flags
#define ObDereferenceObject
_Out_ PBOOLEAN CopyOnOpen
#define PsGetCurrentProcess
_Out_ PBOOLEAN _Out_ PBOOLEAN _Out_ PSECURITY_IMPERSONATION_LEVEL ImpersonationLevel
#define RtlEqualLuid(Luid1, Luid2)