1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

pam: try to avoid racey unlock states

This commit is contained in:
bbedward
2025-10-29 12:59:35 -04:00
parent d68a6a1056
commit 85f8e362e6

View File

@@ -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) {
if (!root.unlockInProgress) {
root.unlockInProgress = true;
fprint.abort();
root.unlockRequested();
}
return;
}
@@ -92,7 +97,11 @@ Scope {
return;
if (res === PamResult.Success) {
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;
}
}