summaryrefslogtreecommitdiffstats
path: root/src/home
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-02-19 18:45:49 +0100
committerLennart Poettering <lennart@poettering.net>2024-02-20 16:50:04 +0100
commitb2ac9280889ce5915e9b8437ee2aff134142ace9 (patch)
treef24f06dfaefbb8537de9313c5954506261e74b84 /src/home
parentman: tweak cryptsetup credentials docs a bit (diff)
downloadsystemd-b2ac9280889ce5915e9b8437ee2aff134142ace9.tar.xz
systemd-b2ac9280889ce5915e9b8437ee2aff134142ace9.zip
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.
Diffstat (limited to 'src/home')
-rw-r--r--src/home/homectl-pkcs11.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/home/homectl-pkcs11.c b/src/home/homectl-pkcs11.c
index b9ee8acc4c..bb582d7d47 100644
--- a/src/home/homectl-pkcs11.c
+++ b/src/home/homectl-pkcs11.c
@@ -153,7 +153,14 @@ int identity_add_pkcs11_key_data(JsonVariant **v, const char *uri) {
assert(v);
- r = pkcs11_acquire_public_key(uri, "home directory operation", "user-home", "home.token-pin", &pkey, &pin);
+ r = pkcs11_acquire_public_key(
+ uri,
+ "home directory operation",
+ "user-home",
+ "home.token-pin",
+ /* askpw_flags= */ 0,
+ &pkey,
+ &pin);
if (r < 0)
return r;