ObDereferenceObject(Thread);
/* Close its handle, killing it */
- ObCloseHandle(ThreadHandle, PreviousMode);
+ ObCloseHandle(hThread, PreviousMode);
/* Return the exception code */
_SEH2_YIELD(return _SEH2_GetExceptionCode());
ObDereferenceObject(Thread);
/* Close its handle, killing it */
- ObCloseHandle(ThreadHandle, PreviousMode);
+ ObCloseHandle(hThread, PreviousMode);
return Status;
}
CidEntry = ExMapHandleToPointer(PspCidTable, ThreadId);
if (CidEntry)
{
- /* Get the Process */
+ /* Get the Thread */
FoundThread = CidEntry->Object;
- /* Make sure it's really a process */
+ /* Make sure it's really a thread */
if (FoundThread->Tcb.Header.Type == ThreadObject)
{
/* Safe Reference and return it */
/*
* @implemented
*/
-PTEB
+PVOID
NTAPI
PsGetCurrentThreadTeb(VOID)
{
}
}
+NTSTATUS
+NTAPI
+PsWrapApcWow64Thread(IN OUT PVOID *ApcContext,
+ IN OUT PVOID *ApcRoutine)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
NTSTATUS
NTAPI
NtCreateThread(OUT PHANDLE ThreadHandle,
sizeof(OBJECT_ATTRIBUTES),
sizeof(ULONG));
HasObjectName = (ObjectAttributes->ObjectName != NULL);
- Attributes = ObjectAttributes->Attributes;
+
+ /* Validate user attributes */
+ Attributes = ObpValidateAttributes(ObjectAttributes->Attributes, PreviousMode);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
{
/* Otherwise just get the data directly */
HasObjectName = (ObjectAttributes->ObjectName != NULL);
- Attributes = ObjectAttributes->Attributes;
+
+ /* Still have to sanitize attributes */
+ Attributes = ObpValidateAttributes(ObjectAttributes->Attributes, PreviousMode);
}
/* Can't pass both, fail */
Status = SeCreateAccessState(&AccessState,
&AuxData,
DesiredAccess,
- &PsProcessType->TypeInfo.GenericMapping);
+ &PsThreadType->TypeInfo.GenericMapping);
if (!NT_SUCCESS(Status)) return Status;
/* Check if this is a debugger */