}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- /* Return the exception code */
- _SEH2_YIELD(return _SEH2_GetExceptionCode());
+ /* Get the exception code */
+ Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
+ if (!NT_SUCCESS(Status)) break;
+
/* Get the LPC Port */
Status = ObReferenceObjectByHandle(PortHandle,
0,
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- /* Return the exception code */
- _SEH2_YIELD(return _SEH2_GetExceptionCode());
+ /* Get the exception code */
+ Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
+ if (!NT_SUCCESS(Status)) break;
+
/* Assign the actual token */
Status = PspSetPrimaryToken(Process, TokenHandle, NULL);
break;
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- /* Return the exception code */
- _SEH2_YIELD(return _SEH2_GetExceptionCode());
+ /* Get the exception code */
+ Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
+ if (!NT_SUCCESS(Status)) break;
+
/* Setting the session id requires the SeTcbPrivilege */
if (!SeSinglePrivilegeCheck(SeTcbPrivilege, PreviousMode))
{
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
/* Return the exception code */
- _SEH2_YIELD(return _SEH2_GetExceptionCode());
+ Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
+ if (!NT_SUCCESS(Status)) break;
+
/* Check for invalid PriorityClass value */
if (PriorityClass.PriorityClass > PROCESS_PRIORITY_CLASS_ABOVE_NORMAL)
{
Access = THREAD_SET_THREAD_TOKEN;
}
- /* Reference the process */
+ /* Reference the thread */
Status = ObReferenceObjectByHandle(ThreadHandle,
Access,
PsThreadType,
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- /* Return the exception code */
- _SEH2_YIELD(return _SEH2_GetExceptionCode());
+ /* Get the exception code */
+ Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
+ if (!NT_SUCCESS(Status)) break;
+
/* Validate it */
if ((Priority > HIGH_PRIORITY) ||
(Priority <= LOW_PRIORITY))
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- /* Return the exception code */
- _SEH2_YIELD(return _SEH2_GetExceptionCode());
+ /* Get the exception code */
+ Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
+ if (!NT_SUCCESS(Status)) break;
+
/* Validate it */
if ((Priority > THREAD_BASE_PRIORITY_MAX) ||
(Priority < THREAD_BASE_PRIORITY_MIN))
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- /* Return the exception code */
- _SEH2_YIELD(return _SEH2_GetExceptionCode());
+ /* Get the exception code */
+ Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- /* Return the exception code */
- _SEH2_YIELD(return _SEH2_GetExceptionCode());
+ /* Get the exception code */
+ Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
+ if (!NT_SUCCESS(Status)) break;
+
/* Assign the actual token */
Status = PsAssignImpersonationToken(Thread, TokenHandle);
break;
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- /* Return the exception code */
- _SEH2_YIELD(return _SEH2_GetExceptionCode());
+ /* Get the exception code */
+ Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
+ if (!NT_SUCCESS(Status)) break;
+
/* Set the address */
Thread->Win32StartAddress = Address;
break;
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- /* Return the exception code */
- _SEH2_YIELD(return _SEH2_GetExceptionCode());
+ /* Get the exception code */
+ Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
+ if (!NT_SUCCESS(Status)) break;
+
/* Validate it */
if (IdealProcessor > MAXIMUM_PROCESSORS)
{
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- /* Return the exception code */
- _SEH2_YIELD(return _SEH2_GetExceptionCode());
+ /* Get the exception code */
+ Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
+ if (!NT_SUCCESS(Status)) break;
+
/* Call the kernel */
KeSetDisableBoostThread(&Thread->Tcb, (BOOLEAN)DisableBoost);
break;
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- /* Return the exception code */
- _SEH2_YIELD(return _SEH2_GetExceptionCode());
+ /* Get the exception code */
+ Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
+ if (!NT_SUCCESS(Status)) break;
+
/* This is only valid for the current thread */
if (Thread != PsGetCurrentThread())
{