Skip to content

Commit 049973b

Browse files
aafeijoo-susejohannbg
authored andcommitted
feat(fido2): introducing the fido2 module
This module allows to unlock an encrypted filesystem using a FIDO2 security token.
1 parent 5d990a0 commit 049973b

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

Diff for: modules.d/91fido2/module-setup.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
# This file is part of dracut.
3+
# SPDX-License-Identifier: GPL-2.0-or-later
4+
5+
# Prerequisite check(s) for module.
6+
check() {
7+
# Return 255 to only include the module, if another module requires it.
8+
return 255
9+
}
10+
11+
# Module dependency requirements.
12+
depends() {
13+
# This module has external dependency on other module(s).
14+
echo systemd-udevd
15+
# Return 0 to include the dependent module(s) in the initramfs.
16+
return 0
17+
}
18+
19+
# Install the required file(s) and directories for the module in the initramfs.
20+
install() {
21+
# Install required libraries.
22+
_arch=${DRACUT_ARCH:-$(uname -m)}
23+
inst_libdir_file \
24+
{"tls/$_arch/",tls/,"$_arch/",}"libfido2.so.*" \
25+
{"tls/$_arch/",tls/,"$_arch/",}"libcryptsetup.so.*" \
26+
{"tls/$_arch/",tls/,"$_arch/",}"libcbor.so.*" \
27+
{"tls/$_arch/",tls/,"$_arch/",}"libhidapi-hidraw.so.*"
28+
}

Diff for: pkgbuild/dracut.spec

+1
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
372372
%{dracutlibdir}/modules.d/90qemu
373373
%{dracutlibdir}/modules.d/91crypt-gpg
374374
%{dracutlibdir}/modules.d/91crypt-loop
375+
%{dracutlibdir}/modules.d/91fido2
375376
%{dracutlibdir}/modules.d/91tpm2-tss
376377
%{dracutlibdir}/modules.d/95debug
377378
%{dracutlibdir}/modules.d/95fstab-sys

0 commit comments

Comments
 (0)