Fix double-fetch from user space.
This commit is contained in:
parent
f452bfbbf6
commit
f90eae89db
|
@ -504,7 +504,8 @@ _FX NTSTATUS Session_Api_DisableForce(PROCESS *proc, ULONG64 *parms)
|
||||||
in_flag = args->set_flag.val;
|
in_flag = args->set_flag.val;
|
||||||
if (in_flag) {
|
if (in_flag) {
|
||||||
ProbeForRead(in_flag, sizeof(ULONG), sizeof(ULONG));
|
ProbeForRead(in_flag, sizeof(ULONG), sizeof(ULONG));
|
||||||
if (*in_flag) {
|
ULONG in_flag_value = *in_flag;
|
||||||
|
if (in_flag_value) {
|
||||||
|
|
||||||
if (! Session_CheckAdminAccess(L"ForceDisableAdminOnly"))
|
if (! Session_CheckAdminAccess(L"ForceDisableAdminOnly"))
|
||||||
return STATUS_ACCESS_DENIED;
|
return STATUS_ACCESS_DENIED;
|
||||||
|
@ -513,7 +514,7 @@ _FX NTSTATUS Session_Api_DisableForce(PROCESS *proc, ULONG64 *parms)
|
||||||
} else
|
} else
|
||||||
time.QuadPart = 0;
|
time.QuadPart = 0;
|
||||||
|
|
||||||
if (*in_flag == DISABLE_JUST_THIS_PROCESS) {
|
if (in_flag_value == DISABLE_JUST_THIS_PROCESS) {
|
||||||
|
|
||||||
Process_DfpInsert(PROCESS_TERMINATED, PsGetCurrentProcessId());
|
Process_DfpInsert(PROCESS_TERMINATED, PsGetCurrentProcessId());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue