mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-15 04:40:05 +01:00
Set inline integrity flag if no underlying dm-integrity device
Cryptsetup status does not report when the hw inline integrity is set without the underlying dm-integrity device. Fixes: #965
This commit is contained in:
12
lib/setup.c
12
lib/setup.c
@@ -5843,11 +5843,13 @@ int crypt_get_active_device(struct crypt_device *cd, const char *name,
|
||||
* we need flags from underlying dm-integrity device.
|
||||
* This check must be skipped for non-LUKS2 integrity device.
|
||||
*/
|
||||
if ((isLUKS2(cd->type) || !cd->type) && crypt_get_integrity_tag_size(cd) &&
|
||||
(iname = dm_get_active_iname(cd, name))) {
|
||||
if (dm_query_device(cd, iname, 0, &dmdi) >= 0)
|
||||
dmd.flags |= dmdi.flags;
|
||||
free(iname);
|
||||
if ((isLUKS2(cd->type) || !cd->type) && crypt_get_integrity_tag_size(cd)) {
|
||||
if ((iname = dm_get_active_iname(cd, name))) {
|
||||
if (dm_query_device(cd, iname, 0, &dmdi) >= 0)
|
||||
dmd.flags |= dmdi.flags;
|
||||
free(iname);
|
||||
} else
|
||||
dmd.flags |= (CRYPT_ACTIVATE_NO_JOURNAL | CRYPT_ACTIVATE_INLINE_MODE);
|
||||
}
|
||||
|
||||
if (cd && isTCRYPT(cd->type)) {
|
||||
|
||||
Reference in New Issue
Block a user