Skip to content

gdm/util: Only start fingerprint service synchronously when it's default (and without crashing)

Marco Trevisan requested to merge 3v1n0/gnome-shell:fprintd-init-fixes into main

On ShellUserVerifier construction we used to start fprintd in a sync fashion all the times, however in case the daemon had startup failures or was hanging for whatever reason (like due to devices probing, given that fprintd synchronously wait for them all to be initialized) we used to just fail, leaving gdm or the lockscreen inusable.

While this could be prevented with a try/catch statement, there's no much point to wait for fprintd if that's not the default authentication service, and so:

  • If we use gdm-fingerprint as default auth method, use a sync call to initialize it and in case of failures, just continue with fallback authentication mechanism (password)

  • Otherwise, asynchronously initialize fprintd and continue with the ShellUserVerifier without fingerprint support until we got a reply. In case the service fails to deliver us a result, we don't give up but we will try doing that at each authentication via _checkForFingerprintReader(). In case all works properly, as per the previous commit, once the initialization is done, we'll start the fingerprint PAM gdm service.

Fixes #5168 (closed)

Dowstream bugs:

Merge request reports