gdm/util: Restart auth if default service changed
If a default service changed while the previous one was active we need to reset the authentication so that we set back to the expected one. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2267>
This commit is contained in:
parent
9af029e968
commit
dc4f0f9053
@ -519,6 +519,8 @@ export class ShellUserVerifier extends Signals.EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_updateDefaultService() {
|
_updateDefaultService() {
|
||||||
|
const oldDefaultService = this._defaultService;
|
||||||
|
|
||||||
if (this._settings.get_boolean(PASSWORD_AUTHENTICATION_KEY))
|
if (this._settings.get_boolean(PASSWORD_AUTHENTICATION_KEY))
|
||||||
this._defaultService = PASSWORD_SERVICE_NAME;
|
this._defaultService = PASSWORD_SERVICE_NAME;
|
||||||
else if (this._settings.get_boolean(SMARTCARD_AUTHENTICATION_KEY))
|
else if (this._settings.get_boolean(SMARTCARD_AUTHENTICATION_KEY))
|
||||||
@ -530,6 +532,11 @@ export class ShellUserVerifier extends Signals.EventEmitter {
|
|||||||
log('no authentication service is enabled, using password authentication');
|
log('no authentication service is enabled, using password authentication');
|
||||||
this._defaultService = PASSWORD_SERVICE_NAME;
|
this._defaultService = PASSWORD_SERVICE_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (oldDefaultService &&
|
||||||
|
oldDefaultService !== this._defaultService &&
|
||||||
|
this._activeServices.has(oldDefaultService))
|
||||||
|
this._cancelAndReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
async _startService(serviceName) {
|
async _startService(serviceName) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user