]> git.ipfire.org Git - thirdparty/systemd.git/commit
cryptenroll: Fix reading keyfile from socket
authorFelix Riemann <felix.riemann@sma.de>
Fri, 2 Feb 2024 17:08:52 +0000 (18:08 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 6 Feb 2024 12:44:42 +0000 (12:44 +0000)
commit0119370cbba902cdb162cc4a1eb2ac8a38058bdd
tree9aeb17f4ed433e4c9267c750b1ed5ac123c42044
parentd50f58d641d32cddeb1fef550445724cafdae2f3
cryptenroll: Fix reading keyfile from socket

systemd-cryptenroll uses the READ_FULL_FILE_CONNECT_SOCKET flag when
reading the keyfile to also allow reading it from a socket. But it also
sets the offset to 0, causing an unnecessary seek to the beginning of
the newly opened keyfile and disables socket support again, as these do
not support seeking.

Disable seeking entirely to remove the unneeded seek and restore support
for reading the keyfile from a socket again as with systemd-cryptsetup.
src/cryptenroll/cryptenroll.c