From eeaf884f5b76a72ec9192ce25a6e025e918440a3 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Jun 01 2023 14:37:09 +0000 Subject: cryptenroll: update log messages (cherry picked from commit 70b53893f1b63aa98a4aa172d04a75e437cded7b) --- diff --git a/src/cryptenroll/cryptenroll-password.c b/src/cryptenroll/cryptenroll-password.c index 72f2165..4bde315 100644 --- a/src/cryptenroll/cryptenroll-password.c +++ b/src/cryptenroll/cryptenroll-password.c @@ -34,7 +34,7 @@ int load_volume_key_password( envpw, strlen(envpw)); if (r < 0) - return log_error_errno(r, "Password from environment variable $PASSWORD did not work."); + return log_error_errno(r, "Password from environment variable $PASSWORD did not work: %m"); } else { AskPasswordFlags ask_password_flags = ASK_PASSWORD_PUSH_CACHE|ASK_PASSWORD_ACCEPT_CACHED; _cleanup_free_ char *question = NULL, *disk_path = NULL; @@ -56,7 +56,7 @@ int load_volume_key_password( if (--i == 0) return log_error_errno(SYNTHETIC_ERRNO(ENOKEY), - "Too many attempts, giving up:"); + "Too many attempts, giving up."); r = ask_password_auto( question, "drive-harddisk", id, "cryptenroll", "cryptenroll.passphrase", USEC_INFINITY, @@ -80,7 +80,7 @@ int load_volume_key_password( if (r >= 0) break; - log_error_errno(r, "Password not correct, please try again."); + log_error_errno(r, "Password not correct, please try again: %m"); ask_password_flags &= ~ASK_PASSWORD_ACCEPT_CACHED; } } @@ -124,7 +124,7 @@ int enroll_password( if (--i == 0) return log_error_errno(SYNTHETIC_ERRNO(ENOKEY), - "Too many attempts, giving up:"); + "Too many attempts, giving up."); question = strjoin("Please enter new passphrase for disk ", node, ":"); if (!question)