]> git.ipfire.org Git - thirdparty/systemd.git/commit
cryptsetup: Give NV index missing its own error code
authorKai Lüke <kai@amutable.com>
Mon, 6 Jul 2026 13:54:38 +0000 (22:54 +0900)
committerKai Lüke <pothos@users.noreply.github.com>
Fri, 10 Jul 2026 06:07:47 +0000 (08:07 +0200)
commite2b89bc3d5d648d825990376f7ff2ceda1db295e
treeab222731be19052cccc551ec052a7603b9c51d6e
parent7fb6b9c2a279ff7b65f0111270094a83ad636ec9
cryptsetup: Give NV index missing its own error code

To be able to continue trying other tokens to unlock a disk the missing
NV index case was mapped to EREMOTE (foreign TPM) which was ok because
this mostly happens when trying to unlock on another system. Still it
might be useful to deal with NV index errors differently.
Give it its own EADDRNOTAVAIL error and handle it at all call sites.
src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-tpm2.c
src/cryptsetup/cryptsetup-tokens/luks2-tpm2.c
src/shared/creds-util.c
src/shared/cryptsetup-tpm2.c
src/shared/tpm2-util.c
src/shared/tpm2-util.h
src/shared/varlink-io.systemd.Credentials.c