explicitly close FIDO2 devices
authorpedro martelletto <pedro@yubico.com>
Wed, 8 Sep 2021 08:42:56 +0000 (10:42 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 12 Oct 2021 13:09:17 +0000 (15:09 +0200)
commit5bc8092397c8d13d8f4ac1a308f2f89e76cdd591
tree6ab94df8948134a4dc2f632eb31a80a590087ec4
parent9b729841b1d9a20219935f67657fafc1a1dc22c2
explicitly close FIDO2 devices

FIDO2 device access is serialised by libfido2 using flock().
Therefore, make sure to close a FIDO2 device once we are done
with it, or we risk opening it again at a later point and
deadlocking. Fixes #20664.

(cherry picked from commit b6aa89b0a399992c8ea762e6ec4f30cff90618f2)
(cherry picked from commit d6e4920b10c3da1665cb44f4686893b865003d12)
src/shared/libfido2-util.c
src/shared/libfido2-util.h