From 7e39cace867b328f9e4e03bd62fbae365a8ce72c Mon Sep 17 00:00:00 2001
From: Benjamin Berg <bberg@redhat.com>
Date: Fri, 23 Apr 2021 16:52:24 +0200
Subject: [PATCH] gdm: Fix password auth after secondary service failure
---
js/gdm/authPrompt.js | 7 ++++---
js/gdm/util.js | 6 ++++--
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index d2c9a1659..8bde7673c 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -279,7 +279,9 @@ var AuthPrompt = GObject.registerClass({
}
_onVerificationFailed(userVerifier, serviceName, canRetry) {
- const wasQueryingService = this._queryingService === serviceName;
+ if (this._queryingService !== serviceName)
+ return;
+
this._queryingService = null;
this.clear();
@@ -287,8 +289,7 @@ var AuthPrompt = GObject.registerClass({
this.setActorInDefaultButtonWell(null);
this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED;
- if (wasQueryingService)
- Util.wiggle(this._entry);
+ Util.wiggle(this._entry);
}
_onVerificationComplete() {
diff --git a/js/gdm/util.js b/js/gdm/util.js
index 1ee84acde..3536528a3 100644
--- a/js/gdm/util.js
+++ b/js/gdm/util.js
@@ -693,7 +693,9 @@ var ShellUserVerifier = class {
const canRetry = retry && this._canRetry();
- this._disconnectSignals();
+ if (this.serviceIsForeground(serviceName))
+ this._disconnectSignals();
+
this._filterServiceMessages(serviceName, MessageType.ERROR);
if (canRetry) {
@@ -707,7 +709,7 @@ var ShellUserVerifier = class {
this._retry(serviceName);
});
}
- } else {
+ } else if (this.serviceIsForeground(serviceName)) {
// eslint-disable-next-line no-lonely-if
if (!this.hasPendingMessages) {
this._cancelAndReset();
--
2.30.2