Fix logon-screen password with click approval (#14335)

This commit is contained in:
Amirhosein Akhlaghpoor
2026-02-24 13:14:18 +00:00
committed by GitHub
parent 0016033937
commit eb239501bc
3 changed files with 34 additions and 3 deletions

View File

@@ -527,6 +527,7 @@ const SERVICE_TYPE: ServiceType = ServiceType::OWN_PROCESS;
extern "C" {
fn get_current_session(rdp: BOOL) -> DWORD;
fn is_session_locked(include_rdp: BOOL) -> BOOL;
fn LaunchProcessWin(
cmd: *const u16,
session_id: DWORD,
@@ -1129,6 +1130,10 @@ pub fn is_prelogin() -> bool {
username.is_empty() || username == "SYSTEM"
}
pub fn is_locked() -> bool {
unsafe { is_session_locked(share_rdp()) == TRUE }
}
// `is_logon_ui()` is regardless of multiple sessions now.
// It only check if "LogonUI.exe" exists.
//