]> git.ipfire.org Git - thirdparty/systemd.git/commit
cryptsetup: drop "headless" bool, make it a flag in AskPasswordFlags instead 31400/head
authorLennart Poettering <lennart@poettering.net>
Mon, 19 Feb 2024 17:45:49 +0000 (18:45 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 20 Feb 2024 15:50:04 +0000 (16:50 +0100)
commitb2ac9280889ce5915e9b8437ee2aff134142ace9
treef24f06dfaefbb8537de9313c5954506261e74b84
parent732285eb8c2c597c7289d612fc99ad467eff85a1
cryptsetup: drop "headless" bool, make it a flag in AskPasswordFlags instead

This bool controls whether we should interactively ask for a password,
which is pretty much what the ask_password-api.c APIs are about. Hence,
just make the bool a flag in AskPasswordFlags enum, and use it
everywhere.

This still catches the flag early in upper levels of the codebase,
exactly as before, but if the flag is still present in the lower layers
it's also handled there and results in ENOEXEC if seen.

This is mostly an excercise in simplifying our ridiculously long
function call parameter lists a bit.
16 files changed:
src/cryptenroll/cryptenroll-fido2.c
src/cryptenroll/cryptenroll-pkcs11.c
src/cryptenroll/cryptenroll-tpm2.c
src/cryptsetup/cryptsetup-pkcs11.c
src/cryptsetup/cryptsetup-pkcs11.h
src/cryptsetup/cryptsetup-tokens/luks2-pkcs11.c
src/cryptsetup/cryptsetup.c
src/home/homectl-pkcs11.c
src/shared/ask-password-api.c
src/shared/ask-password-api.h
src/shared/cryptsetup-fido2.c
src/shared/cryptsetup-fido2.h
src/shared/cryptsetup-tpm2.c
src/shared/cryptsetup-tpm2.h
src/shared/pkcs11-util.c
src/shared/pkcs11-util.h