From 1f0fe38634419df2748e88cb8aead8d5549764d0 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Tue, 22 May 2018 14:36:55 +0200 Subject: [PATCH] [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 e9861de796c..fe558c452cd 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); }