29 lines
1.2 KiB
Diff
29 lines
1.2 KiB
Diff
From: Anton Partanen
|
|
Subject: [PATCH] Allow retry after transient authentication unavailability
|
|
|
|
PAM_AUTHINFO_UNAVAIL is not necessarily permanent. In particular,
|
|
pam_fprintd returns it when an active verification is interrupted by system
|
|
suspend. Treat that result as a failed attempt so a later start request can
|
|
retry it. Continue to cache PAM_MODULE_UNKNOWN as permanent unavailability.
|
|
---
|
|
greeter/pamauthenticator.cpp | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/greeter/pamauthenticator.cpp b/greeter/pamauthenticator.cpp
|
|
index e2011fd..bb2521f 100644
|
|
--- a/greeter/pamauthenticator.cpp
|
|
+++ b/greeter/pamauthenticator.cpp
|
|
@@ -176,7 +176,9 @@ void PamWorker::authenticate()
|
|
pam_setcred(m_handle, PAM_REFRESH_CRED);
|
|
/* ignore errors on refresh credentials. If this did not work we use the old ones. */
|
|
Q_EMIT succeeded();
|
|
- } else if (rc == PAM_AUTHINFO_UNAVAIL || rc == PAM_MODULE_UNKNOWN) {
|
|
+ } else if (rc == PAM_AUTHINFO_UNAVAIL) {
|
|
+ Q_EMIT failed();
|
|
+ } else if (rc == PAM_MODULE_UNKNOWN) {
|
|
m_unavailable = true;
|
|
Q_EMIT unavailabilityChanged(m_unavailable);
|
|
} else {
|
|
--
|
|
2.51.0
|