gdm: Only unlock with smartcard, if smartcard used for login

If a smartcard is used for login, and the smartcard removal action
is configured to lock the screen then we need to make sure the smartcard
gets used for unlock (since otherwise you could ended up with a removed
smartcard at an unlocked screen).
This commit is contained in:
Ray Strode 2015-09-28 19:56:53 -04:00
parent c3737f9546
commit 11092fa961

View file

@ -641,7 +641,10 @@ export class ShellUserVerifier extends Signals.EventEmitter {
}
_getDetectedDefaultService() {
if (this._settings.get_boolean(PASSWORD_AUTHENTICATION_KEY))
if (this._smartcardManager.loggedInWithToken() &&
this._smartcardManager.lockOnRemoval())
return SMARTCARD_SERVICE_NAME;
else if (this._settings.get_boolean(PASSWORD_AUTHENTICATION_KEY))
return PASSWORD_SERVICE_NAME;
else if (this._smartcardManager)
return SMARTCARD_SERVICE_NAME;