]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cryptenroll: use correct askpw id for pw request
authorLennart Poettering <lennart@poettering.net>
Mon, 19 Feb 2024 16:01:01 +0000 (17:01 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 20 Feb 2024 15:50:00 +0000 (16:50 +0100)
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.)

src/cryptenroll/cryptenroll-password.c

index a9f52bceeb4d3fa560c3054162eb1ad74cb48339..a9bd8a1dd013c842909e7fc02602b3be9aa96b2f 100644 (file)
@@ -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();