[gnome-shell] gdm: Restart only the service that failed at verification-failure



commit 829a096ba1c14eec04ebe69740fc49971ac2432b
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Tue Feb 2 17:57:45 2021 +0100

    gdm: Restart only the service that failed at verification-failure
    
    When verification failed using a specific authentication service we're
    currently restarting the whole user authentication system, which leads
    to lots of unneeded operations (reinitializing a new user verifier proxy,
    restarting all the gdm workers with the relative PAM modules and so on).
    And this makes also debugging of login problems more complicated, given
    we're cluttering the journal with repeated data.
    
    However, at reauthentication failure GDM has already set up for us an
    user verifier that we can use reuse to start only the service that had a
    failure. So when possible, just start a new service instead of rebooting
    the whole authorization process.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1622>

 js/gdm/util.js | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/js/gdm/util.js b/js/gdm/util.js
index 15f8de0fe0..a98d63509b 100644
--- a/js/gdm/util.js
+++ b/js/gdm/util.js
@@ -591,9 +591,10 @@ var ShellUserVerifier = class {
         this._onReset();
     }
 
-    _retry() {
-        this.cancel();
-        this.begin(this._userName, new Batch.Hold());
+    _retry(serviceName) {
+        this._hold = new Batch.Hold();
+        this._connectSignals();
+        this._startService(serviceName);
     }
 
     _verificationFailed(serviceName, retry) {
@@ -611,13 +612,13 @@ var ShellUserVerifier = class {
 
         if (canRetry) {
             if (!this.hasPendingMessages) {
-                this._retry();
+                this._retry(serviceName);
             } else {
                 const cancellable = this._cancellable;
                 let signalId = this.connect('no-more-messages', () => {
                     this.disconnect(signalId);
                     if (!cancellable.is_cancelled())
-                        this._retry();
+                        this._retry(serviceName);
                 });
             }
         } else {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]