reactos/base/system
Hermès Bélusca-Maïto 82a57e41e1
[WINLOGON] Correctly reset LogonState in case logon or shutdown fails (#8133)
CORE-18351 CORE-18237 CORE-17137 CORE-16567
CORE-15360 CORE-5071 CORE-3804

Reset `LogonState` back to `STATE_LOGGED_OFF` before invoking
`WlxDisplaySASNotice()` when:
- in `STATE_LOGGED_OFF_SAS` state, `HandleLogon()` failed;
- or when an attempted shutdown operation failed.

This fixes the resulting inconsistent `LogonState` that happened if
any of these operations failed due to legitimate reasons. For example,
a corrupted user profile that caused the login attempt to abort, or,
an ongoing shutdown attempt being aborted as well.

One of the user-visible effects of this inconsistency, was the inability
to access the familiar Logged-Out SAS dialog by pressing Ctrl-Alt-Del at
the invite (SAS notice) dialog, because the `LogonState` was incorrectly
left into the `STATE_LOGGED_OFF_SAS` state, instead of being reset to
`STATE_LOGGED_OFF`.

----

Typical scenario:
The "Administrator" user, who is auto-logged-in by default after the
installation, gets a corrupted ntuser.dat profile registry hive if the
2nd-stage installation is aborted at the end by force-restarting ReactOS.
After reboot, ReactOS tries to log into the account, but fails, and goes
back to the Ctrl-Alt-Del invite dialog.
Before this fix, the user couldn't go into the Logged-Out SAS dialog to
enter new login credentials and attempt login to another account.
This is now fixed.
2025-06-16 14:16:47 +02:00
..
autochk
bootok
chkdsk [BASE] Add and improve Italian (it-IT) translation (#7893) 2025-06-02 21:40:46 +02:00
diskpart [DISKPART] Fix wrong '\n' in Italian translation 2025-06-08 08:58:59 +02:00
dllhost
expand
format [FORMAT] Usage(): Remove redundant LoadFMIFSEntryPoints() call (#8072) 2025-06-02 22:30:47 +02:00
logonui
lsass
msiexec [CMAKE] Introduce set_wine_module (Retry) (#7860) 2025-04-04 20:44:38 +09:00
regsvr32
rundll32
runonce [BASE] Add and improve Italian (it-IT) translation (#7893) 2025-06-02 21:40:46 +02:00
services [BASE] Add and improve Italian (it-IT) translation (#7893) 2025-06-02 21:40:46 +02:00
smss
subst [SUBST] Update Romanian (ro-RO) translation (#6395) 2024-01-21 21:26:30 +01:00
userinit [USERINIT] Add Esperanto (eo-AA) translation (#7534) 2025-01-06 18:19:54 +01:00
winlogon [WINLOGON] Correctly reset LogonState in case logon or shutdown fails (#8133) 2025-06-16 14:16:47 +02:00
CMakeLists.txt