mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[WINSRV] usersrv: Simplify sanity checks in UserClientShutdown
UserClientShutdown will never be called for csrss so we don't need to have a check for that. The existing check was broken and wasn't doing anything anyway. Handle processing winlogon by doing nothing so that consrv won't be bothered about it.
This commit is contained in:
parent
d84ab9ec7c
commit
0a80b77e76
1 changed files with 6 additions and 4 deletions
|
@ -770,15 +770,17 @@ UserClientShutdown(IN PCSR_PROCESS CsrProcess,
|
|||
return CsrShutdownNonCsrProcess;
|
||||
}
|
||||
|
||||
/* Do not kill Winlogon or CSRSS */
|
||||
if (CsrProcess->ClientId.UniqueProcess == NtCurrentProcess() ||
|
||||
CsrProcess->ClientId.UniqueProcess == UlongToHandle(LogonProcessId))
|
||||
/* Do not kill Winlogon */
|
||||
if (CsrProcess->ClientId.UniqueProcess == UlongToHandle(LogonProcessId))
|
||||
{
|
||||
DPRINT("Not killing %s; CsrProcess->ShutdownFlags = %lu\n",
|
||||
CsrProcess->ClientId.UniqueProcess == NtCurrentProcess() ? "CSRSS" : "Winlogon",
|
||||
CsrProcess->ShutdownFlags);
|
||||
|
||||
return CsrShutdownNonCsrProcess;
|
||||
/* Returning CsrShutdownCsrProcess means that we handled this process by doing nothing */
|
||||
/* This will mark winlogon as processed so consrv won't be notified again for it */
|
||||
CsrDereferenceProcess(CsrProcess);
|
||||
return CsrShutdownCsrProcess;
|
||||
}
|
||||
|
||||
/* Notify the process for shutdown if needed */
|
||||
|
|
Loading…
Reference in a new issue