diff --git a/Sandboxie/core/drv/obj.h b/Sandboxie/core/drv/obj.h index d4978dc6..176c3534 100644 --- a/Sandboxie/core/drv/obj.h +++ b/Sandboxie/core/drv/obj.h @@ -90,6 +90,7 @@ extern const OBJECT_NAME_INFORMATION Obj_Unnamed; extern P_ObGetObjectType pObGetObjectType; extern P_ObQueryNameInfo pObQueryNameInfo; +extern BOOLEAN Obj_CallbackInstalled; //--------------------------------------------------------------------------- // Macros Related to ParseProcedure diff --git a/Sandboxie/core/drv/syscall_open.c b/Sandboxie/core/drv/syscall_open.c index e149b61f..cd369486 100644 --- a/Sandboxie/core/drv/syscall_open.c +++ b/Sandboxie/core/drv/syscall_open.c @@ -435,7 +435,8 @@ _FX NTSTATUS Syscall_GetNextThread( if (NT_SUCCESS(status)) { - status = Thread_CheckObject_Common(proc, ProcessObject, DesiredAccess, FALSE); + ACCESS_MASK WriteAccess = (DesiredAccess & THREAD_DENIED_ACCESS_MASK); + status = Thread_CheckObject_Common(proc, ProcessObject, DesiredAccess, WriteAccess, L'T'); ObDereferenceObject(ProcessObject); }