From fddd122956d01e7672e7a6e3a4ffc9b696d34916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 29 May 2018 00:10:09 +0000 Subject: [PATCH] gdm, util: Always allow to retry login in unlock mode When in lockscreen mode there's no point of resetting the auth login as there's no welcome screen, and that would just cause the UI to freeze, with no reason. This could have been useful if we were stopping the user to login for a given time after ALLOWED_FAILURES attempts, but this is not the case yet. (cherry picked from commit cf69fe4b18e9ecf5d33de42c636a42950a1c7cd8) --- js/gdm/util.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/gdm/util.js b/js/gdm/util.js index 0532ca848..105a3207b 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -534,12 +534,13 @@ var ShellUserVerifier = new Lang.Class({ _verificationFailed(retry) { // For Not Listed / enterprise logins, immediately reset // the dialog - // Otherwise, we allow ALLOWED_FAILURES attempts. After that, we - // go back to the welcome screen. + // Otherwise, when in login mode we allow ALLOWED_FAILURES attempts. + // After that, we go back to the welcome screen. this._failCounter++; let canRetry = retry && this._userName && - this._failCounter < this._settings.get_int(ALLOWED_FAILURES_KEY); + (this._reauthOnly || + this._failCounter < this._settings.get_int(ALLOWED_FAILURES_KEY)); if (canRetry) { if (!this.hasPendingMessages) {