From: Lennart Poettering Date: Mon, 19 Feb 2024 16:01:01 +0000 (+0100) Subject: cryptenroll: use correct askpw id for pw request X-Git-Tag: v256-rc1~797^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6278a8655fc3ad9993cfc3e9d2acfe3a688788a9;p=thirdparty%2Fsystemd.git cryptenroll: use correct askpw id for pw request The "id" is used in the askpw protocol to recognize password prompts, in case a service is replying to them and needs some id. Previously we set an incorrect id, the one of cryptsetup. Fix that. (I guess the id is not used much, it comes from a time where we had no credentials, and thus some people wanted to supply passphrases programmatically rather interactively. The usecase is probably gone, but we should still set some valid id I guess.) --- diff --git a/src/cryptenroll/cryptenroll-password.c b/src/cryptenroll/cryptenroll-password.c index a9f52bceeb4..a9bd8a1dd01 100644 --- a/src/cryptenroll/cryptenroll-password.c +++ b/src/cryptenroll/cryptenroll-password.c @@ -49,7 +49,7 @@ int load_volume_key_password( if (!disk_path) return log_oom(); - id = strjoin("cryptsetup:", disk_path); + id = strjoin("cryptenroll:", disk_path); if (!id) return log_oom(); @@ -122,7 +122,7 @@ int enroll_password( if (!disk_path) return log_oom(); - id = strjoin("cryptsetup:", disk_path); + id = strjoin("cryptenroll-new:", disk_path); if (!id) return log_oom();