Author: ekohl
Date: Tue Dec 15 21:38:36 2015
New Revision: 70350
URL:
http://svn.reactos.org/svn/reactos?rev=70350&view=rev
Log:
[WINSRV]
Do not kill system processes when a user is logging off. Fixes user logoff.
#CORE-2391 #resolve
Modified:
trunk/reactos/win32ss/user/winsrv/usersrv/shutdown.c
Modified: trunk/reactos/win32ss/user/winsrv/usersrv/shutdown.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/usersr…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/usersrv/shutdown.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/usersrv/shutdown.c [iso-8859-1] Tue Dec 15 21:38:36
2015
@@ -763,6 +763,14 @@
* Check for process validity
*/
+ /* Do not kill system processes when a user is logging off */
+ if ((Flags & EWX_SHUTDOWN) == EWX_LOGOFF &&
+ (CsrProcess->ShutdownFlags & (SHUTDOWN_OTHERCONTEXT |
SHUTDOWN_SYSTEMCONTEXT)))
+ {
+ DPRINT1("Do not kill a system process in a logoff request!\n");
+ return CsrShutdownNonCsrProcess;
+ }
+
/* Do not kill Winlogon or CSRSS */
if (CsrProcess->ClientId.UniqueProcess == NtCurrentProcess() ||
CsrProcess->ClientId.UniqueProcess == UlongToHandle(LogonProcessId))