mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-06 00:10:04 +01:00
Return proper err when looking for segment digest.
Otherwise keyslot in luksDump are wrongly marked as device keyslots even though default segment is not crypt.
This commit is contained in:
committed by
Milan Broz
parent
078dbfb0a9
commit
39905bd8fd
@@ -89,7 +89,7 @@ int LUKS2_keyslot_for_segment(struct luks2_hdr *hdr, int keyslot, int segment)
|
||||
|
||||
segment_digest = LUKS2_digest_by_segment(NULL, hdr, segment);
|
||||
if (segment_digest < 0)
|
||||
return -EINVAL;
|
||||
return segment_digest;
|
||||
|
||||
return segment_digest == keyslot_digest ? 0 : -ENOENT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user