|
|
f3cbb9 |
From daa05f09d2a79d160c5e355cf26e4c73d7b0f01b Mon Sep 17 00:00:00 2001
|
|
|
f3cbb9 |
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
|
f3cbb9 |
Date: Tue, 14 Mar 2017 21:02:51 +0100
|
|
|
f3cbb9 |
Subject: [PATCH] gdm: Handle absence of Fprint.Manager service
|
|
|
f3cbb9 |
|
|
|
f3cbb9 |
We rely on the service to detect whether a fingerprint reader is
|
|
|
f3cbb9 |
present. It is fine to not support fingerprint authentication
|
|
|
f3cbb9 |
when the service is missing, but currently we don't handle this
|
|
|
f3cbb9 |
case at all and end up with a non-functional login screen.
|
|
|
f3cbb9 |
|
|
|
f3cbb9 |
https://bugzilla.gnome.org/show_bug.cgi?id=780063
|
|
|
f3cbb9 |
---
|
|
|
f3cbb9 |
js/gdm/fingerprint.js | 8 +++++++-
|
|
|
f3cbb9 |
js/gdm/util.js | 5 +++--
|
|
|
f3cbb9 |
2 files changed, 10 insertions(+), 3 deletions(-)
|
|
|
f3cbb9 |
|
|
|
f3cbb9 |
diff --git a/js/gdm/fingerprint.js b/js/gdm/fingerprint.js
|
|
|
f3cbb9 |
index bce0bc6a7..2aeb377ce 100644
|
|
|
f3cbb9 |
--- a/js/gdm/fingerprint.js
|
|
|
f3cbb9 |
+++ b/js/gdm/fingerprint.js
|
|
|
f3cbb9 |
@@ -23,6 +23,12 @@ function FprintManager() {
|
|
|
f3cbb9 |
g_object_path: '/net/reactivated/Fprint/Manager',
|
|
|
f3cbb9 |
g_flags: (Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES) });
|
|
|
f3cbb9 |
|
|
|
f3cbb9 |
- self.init(null);
|
|
|
f3cbb9 |
+ try {
|
|
|
f3cbb9 |
+ self.init(null);
|
|
|
f3cbb9 |
+ } catch(e) {
|
|
|
f3cbb9 |
+ log('Failed to connect to Fprint service: ' + e.message);
|
|
|
f3cbb9 |
+ return null;
|
|
|
f3cbb9 |
+ }
|
|
|
f3cbb9 |
+
|
|
|
f3cbb9 |
return self;
|
|
|
f3cbb9 |
}
|
|
|
f3cbb9 |
diff --git a/js/gdm/util.js b/js/gdm/util.js
|
|
|
f3cbb9 |
index 9517150f0..0048c85bd 100644
|
|
|
f3cbb9 |
--- a/js/gdm/util.js
|
|
|
f3cbb9 |
+++ b/js/gdm/util.js
|
|
|
f3cbb9 |
@@ -132,7 +132,7 @@ const ShellUserVerifier = new Lang.Class({
|
|
|
f3cbb9 |
this._settings.connect('changed',
|
|
|
f3cbb9 |
Lang.bind(this, this._updateDefaultService));
|
|
|
f3cbb9 |
|
|
|
f3cbb9 |
- this._fprintManager = new Fprint.FprintManager();
|
|
|
f3cbb9 |
+ this._fprintManager = Fprint.FprintManager();
|
|
|
f3cbb9 |
this._smartcardManager = SmartcardManager.getSmartcardManager();
|
|
|
f3cbb9 |
|
|
|
f3cbb9 |
// We check for smartcards right away, since an inserted smartcard
|
|
|
f3cbb9 |
@@ -294,7 +294,8 @@ const ShellUserVerifier = new Lang.Class({
|
|
|
f3cbb9 |
_checkForFingerprintReader: function() {
|
|
|
f3cbb9 |
this._haveFingerprintReader = false;
|
|
|
f3cbb9 |
|
|
|
f3cbb9 |
- if (!this._settings.get_boolean(FINGERPRINT_AUTHENTICATION_KEY)) {
|
|
|
f3cbb9 |
+ if (!this._settings.get_boolean(FINGERPRINT_AUTHENTICATION_KEY) ||
|
|
|
f3cbb9 |
+ this._fprintManager == null) {
|
|
|
f3cbb9 |
this._updateDefaultService();
|
|
|
f3cbb9 |
return;
|
|
|
f3cbb9 |
}
|
|
|
f3cbb9 |
--
|
|
|
f3cbb9 |
2.12.0
|
|
|
f3cbb9 |
|