gdm: only unlock with smartcard, if smartcard used for login
If a smartcard is used for login, we need to make sure the smartcard gets used for unlock, too.
This commit is contained in:
parent
8593532801
commit
04d526e9f5
@ -134,7 +134,6 @@ var ShellUserVerifier = new Lang.Class({
|
||||
this._settings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA });
|
||||
this._settings.connect('changed',
|
||||
this._updateDefaultService.bind(this));
|
||||
this._updateDefaultService();
|
||||
|
||||
this._fprintManager = Fprint.FprintManager();
|
||||
this._smartcardManager = SmartcardManager.getSmartcardManager();
|
||||
@ -146,6 +145,8 @@ var ShellUserVerifier = new Lang.Class({
|
||||
this.smartcardDetected = false;
|
||||
this._checkForSmartcard();
|
||||
|
||||
this._updateDefaultService();
|
||||
|
||||
this._smartcardInsertedId = this._smartcardManager.connect('smartcard-inserted',
|
||||
this._checkForSmartcard.bind(this));
|
||||
this._smartcardRemovedId = this._smartcardManager.connect('smartcard-removed',
|
||||
@ -412,7 +413,9 @@ var ShellUserVerifier = new Lang.Class({
|
||||
},
|
||||
|
||||
_updateDefaultService() {
|
||||
if (this._settings.get_boolean(PASSWORD_AUTHENTICATION_KEY))
|
||||
if (this._smartcardManager.loggedInWithToken())
|
||||
this._defaultService = SMARTCARD_SERVICE_NAME;
|
||||
else if (this._settings.get_boolean(PASSWORD_AUTHENTICATION_KEY))
|
||||
this._defaultService = PASSWORD_SERVICE_NAME;
|
||||
else if (this._settings.get_boolean(SMARTCARD_AUTHENTICATION_KEY))
|
||||
this._defaultService = SMARTCARD_SERVICE_NAME;
|
||||
|
Loading…
Reference in New Issue
Block a user