diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-05-09 22:17:15 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-05-09 22:17:15 +0200 |
commit | 0e43ab6d245a77aab35c7963ec636f37e6103984 (patch) | |
tree | 66a70b58044d24c19c46df37c2e2e64c89596887 /src | |
parent | test: TEST-70-TPM2 cleanup (diff) | |
download | systemd-0e43ab6d245a77aab35c7963ec636f37e6103984.tar.xz systemd-0e43ab6d245a77aab35c7963ec636f37e6103984.zip |
cryptenroll: fix an assertion with weak passwords
Passing 0 to log_xxx_errno() leads to an assertion, so let's not do that:
$ NEWPASSWORD="" build-san/systemd-cryptenroll --unlock-key-file=/tmp/password --password "$img"
/tmp/password has 0644 mode that is too permissive, please adjust the ownership and access mode.
Assertion '(_error) != 0' failed at src/cryptenroll/cryptenroll-password.c:164, function enroll_password(). Aborting.
Aborted (core dumped)
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptenroll/cryptenroll-password.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptenroll/cryptenroll-password.c b/src/cryptenroll/cryptenroll-password.c index 25a90b5905..72f2165d49 100644 --- a/src/cryptenroll/cryptenroll-password.c +++ b/src/cryptenroll/cryptenroll-password.c @@ -161,7 +161,7 @@ int enroll_password( if (r < 0) return log_error_errno(r, "Failed to check password for quality: %m"); if (r == 0) - log_warning_errno(r, "Specified password does not pass quality checks (%s), proceeding anyway.", error); + log_warning("Specified password does not pass quality checks (%s), proceeding anyway.", error); keyslot = crypt_keyslot_add_by_volume_key( cd, |