gdm: Do not fail the whole authentication if a background service failed
In case a background service such as the fingerprint authentication fails to start we'd just mark the whole authentication process as failed. Currently this may happen by just putting a wrong password when an user has some fingerprints enrolled, the fingerprint gdm authentication worker may take some time to restart leading to a failure and this is currently also making the password authentication to fail: JS ERROR: Failed to start gdm-fingerprint for u: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.Spawn.Failed: Could not create authentication helper process _promisify/proto[asyncFunc]/</<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:435:45 ### Promise created here: ### _startService@resource:///org/gnome/shell/gdm/util.js:470:42 _beginVerification@resource:///org/gnome/shell/gdm/util.js:495:18 _getUserVerifier@resource:///org/gnome/shell/gdm/util.js:405:14 async*_openReauthenticationChannel@resource:///org/gnome/shell/gdm/util.js:378:22 async*begin@resource:///org/gnome/shell/gdm/util.js:194:18 _retry@resource:///org/gnome/shell/gdm/util.js:561:14 _verificationFailed/signalId<@resource:///org/gnome/shell/gdm/util.js:584:30 _emit@resource:///org/gnome/gjs/modules/core/_signals.js:133:47 finishMessageQueue@resource:///org/gnome/shell/gdm/util.js:268:14 _queueMessageTimeout@resource:///org/gnome/shell/gdm/util.js:273:18 _queueMessageTimeout/this._messageQueueTimeoutId<@resource:///org/gnome/shell/gdm/util.js:288:65 Given that background services are ignored even for queries or any kind of message, we should not fail the authentication request unless the default service fails. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1622>
This commit is contained in:
parent
0ccb8e27d4
commit
36fba1a184
@ -501,6 +501,11 @@ var ShellUserVerifier = class {
|
||||
} catch (e) {
|
||||
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
|
||||
return;
|
||||
if (!this.serviceIsForeground(serviceName)) {
|
||||
logError(e, 'Failed to start %s for %s'.format(serviceName, this._userName));
|
||||
this._hold.release();
|
||||
return;
|
||||
}
|
||||
this._reportInitError(this._userName
|
||||
? 'Failed to start verification for user'
|
||||
: 'Failed to start verification', e);
|
||||
|
Loading…
Reference in New Issue
Block a user