Marco Trevisan (Treviño) 885f1391ab gdm/util: Only start fingerprint service synchronously when it's default
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 in a not usable state.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2267>
2024-02-28 22:12:02 +01:00
..