mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-14 04:10:06 +01:00
Allow --test-passphrase for detached header alone.
Before this fix we required data device specified on cmd line even though it was not necessary for testing passphrase. Fixes: #487.
This commit is contained in:
@@ -1374,7 +1374,7 @@ static int action_open_luks(void)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!data_device && (crypt_get_data_offset(cd) < 8)) {
|
||||
if (!data_device && (crypt_get_data_offset(cd) < 8) && !opt_test_passphrase) {
|
||||
log_err(_("Reduced data offset is allowed only for detached LUKS header."));
|
||||
r = -EINVAL;
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user