1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-10 01:17:44 +03:00

cryptsetup: add missing error branch

Found in the process of trying to figure out #19193, but I doubt it's
going to fix that.
This commit is contained in:
Lennart Poettering 2021-06-01 16:17:24 +02:00
parent 8e1422036a
commit abc50cf6c8

View File

@ -1245,6 +1245,8 @@ static int attach_luks_or_plain_or_bitlk_by_key_file(
log_error_errno(r, "Failed to activate, key file '%s' missing.", key_file);
return -EAGAIN; /* Log actual error, but return EAGAIN */
}
if (r < 0)
return log_error_errno(r, "Failed to read key file '%s': %m", key_file);
if (pass_volume_key)
r = crypt_activate_by_volume_key(cd, name, kfdata, kfsize, flags);