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>
This commit is contained in:
parent
85ad1157df
commit
829a096ba1
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user