From 7552875dbc78eb52e7d3b5a9f784c175ecca585c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 12 Apr 2022 17:05:02 +0200 Subject: [PATCH] gdm/util: Reduce the fprintd proxy wait timeout Given that this may lead to the shell to hang on gdm startup, and that we expect the service to be up and running quickly, we can safely set a 5 seconds timeout instead of using the longer GLib proxy defaults. Part-of: --- js/gdm/util.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/gdm/util.js b/js/gdm/util.js index 83912b734..97df6d687 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -43,6 +43,7 @@ export const DISABLE_USER_LIST_KEY = 'disable-user-list'; // Give user 48ms to read each character of a PAM message const USER_READ_TIME = 48; +const FINGERPRINT_SERVICE_PROXY_TIMEOUT = 5000; const FINGERPRINT_ERROR_TIMEOUT_WAIT = 15; /** @@ -358,6 +359,10 @@ export class ShellUserVerifier extends Signals.EventEmitter { // option, so go ahead a synchronously look for a fingerprint device // during startup or default service update. fprintManager.init(null); + // Do not wait too much for fprintd to reply, as in case it hangs + // we should fail early without having the shell to misbehave + fprintManager.set_default_timeout(FINGERPRINT_SERVICE_PROXY_TIMEOUT); + const [devicePath] = fprintManager.GetDefaultDeviceSync(); this._fprintManager = fprintManager;