https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1f0fe38634419df2748e88cb8aead8d5549764d0

commit 1f0fe38634419df2748e88cb8aead8d5549764d0
Author:     Eric Kohl <eric.k...@reactos.org>
AuthorDate: Tue May 22 14:36:55 2018 +0200
Commit:     Eric Kohl <eric.k...@reactos.org>
CommitDate: Tue May 22 14:36:55 2018 +0200

    [WINLOGON] Prevent shell restart when the user is logged off
---
 base/system/winlogon/sas.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/base/system/winlogon/sas.c b/base/system/winlogon/sas.c
index e9861de796..fe558c452c 100644
--- a/base/system/winlogon/sas.c
+++ b/base/system/winlogon/sas.c
@@ -1372,7 +1372,9 @@ SASWindowProc(
                 case LN_SHELL_EXITED:
                 {
                     /* lParam is the exit code */
-                    if(lParam != 1)
+                    if (lParam != 1 &&
+                        Session->LogonState != STATE_LOGGED_OFF &&
+                        Session->LogonState != STATE_LOGGED_OFF_SAS)
                     {
                         SetTimer(hwndDlg, 1, 1000, NULL);
                     }

Reply via email to