Fix Windows session-based logon and lock-screen detection (#14620)

* Fix Windows session-based logon and lock-screen detection

  - scope LogonUI and locked-state checks to the current Windows session
  - allow permanent password fallback for logon and lock-screen access

Signed-off-by: 21pages <sunboeasy@gmail.com>

* Log permanent-password fallback on logon screen

Signed-off-by: 21pages <sunboeasy@gmail.com>

---------

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2026-03-27 13:22:16 +08:00
committed by GitHub
parent 170516572e
commit f02cd9c0f6
3 changed files with 27 additions and 17 deletions

View File

@@ -580,9 +580,8 @@ extern "C"
return rdp_or_console;
}
BOOL is_session_locked(BOOL include_rdp)
BOOL is_session_locked(DWORD session_id)
{
DWORD session_id = get_current_session(include_rdp);
if (session_id == 0xFFFFFFFF) {
return FALSE;
}