mirror of
https://github.com/systemd/systemd.git
synced 2025-02-28 05:57:33 +03:00
Merge pull request #27714 from yuwata/cryptenroll-password
cryptenroll-password: tiny cleanups
This commit is contained in:
commit
93773df467
@ -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,
|
||||
@ -77,10 +77,8 @@ int load_volume_key_password(
|
||||
if (r >= 0)
|
||||
break;
|
||||
}
|
||||
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 +122,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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user