]> git.ipfire.org Git - thirdparty/dracut-ng.git/commit
feat(90systemd-cryptsetup): socket key files
authorKamil Szczęk <kamil@szczek.dev>
Sat, 4 May 2024 17:58:03 +0000 (19:58 +0200)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Tue, 14 May 2024 16:16:28 +0000 (12:16 -0400)
commit80480a731aabec11a1e72f08725a47c63c45632d
tree86ea71d1d56d2fdbb6591db31fe80cf7a9352539
parentc5cbdaf3050f46c446fe736032ae872376f6d365
feat(90systemd-cryptsetup): socket key files

systemd v248 introduced support for using AF_UNIX stream sockets as key
files in /etc/crypttab. This commit enhances the 90systemd-cryptsetup
module to identify socket units with matching socket file paths.
It then includes the first matching socket unit along with its
corresponding service unit. This correspondence is determined by
checking the Service= option in the socket unit or, if that's not
available, by replacing the .socket suffix with either @.service or
.service, depending on the Accept= option (see systemd.socket(5)).

Futhermore, this functionality handles sockets located under
/run/cryptsetup-keys.d/, which are automatically discoverable by
the systemd-cryptsetup utility when the key file field in /etc/crypttab
is empty.
modules.d/90systemd-cryptsetup/module-setup.sh