From 85f8e362e6022adecfb0759720e81c9f8c7224a8 Mon Sep 17 00:00:00 2001 From: bbedward Date: Wed, 29 Oct 2025 12:59:35 -0400 Subject: [PATCH] pam: try to avoid racey unlock states --- Modules/Lock/Pam.qml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Modules/Lock/Pam.qml b/Modules/Lock/Pam.qml index db7b6bc4..752c17bf 100644 --- a/Modules/Lock/Pam.qml +++ b/Modules/Lock/Pam.qml @@ -11,6 +11,7 @@ Scope { id: root property bool lockSecured: false + property bool unlockInProgress: false readonly property alias passwd: passwd readonly property alias fprint: fprint @@ -50,7 +51,11 @@ Scope { onCompleted: res => { if (res === PamResult.Success) { - root.unlockRequested(); + if (!root.unlockInProgress) { + root.unlockInProgress = true; + fprint.abort(); + root.unlockRequested(); + } return; } @@ -92,7 +97,11 @@ Scope { return; if (res === PamResult.Success) { - root.unlockRequested(); + if (!root.unlockInProgress) { + root.unlockInProgress = true; + passwd.abort(); + root.unlockRequested(); + } return; } @@ -162,8 +171,11 @@ Scope { root.state = ""; root.fprintState = ""; root.lockMessage = ""; + root.unlockInProgress = false; } else { fprint.abort(); + passwd.abort(); + root.unlockInProgress = false; } }