mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-13 11:50:10 +01:00
Enable crypt_header_is_detached for empty contexts.
Also changes few tests now expecting crypt_header_is_detached works with empty contexts.
This commit is contained in:
@@ -3242,7 +3242,7 @@ int crypt_header_is_detached(struct crypt_device *cd)
|
||||
{
|
||||
int r;
|
||||
|
||||
if (!cd || !isLUKS(cd->type))
|
||||
if (!cd || (cd->type && !isLUKS(cd->type)))
|
||||
return -EINVAL;
|
||||
|
||||
r = device_is_identical(crypt_data_device(cd), crypt_metadata_device(cd));
|
||||
|
||||
Reference in New Issue
Block a user