integritysetup: do not use crypt_init_data_device after crypt_init
authorLuca Boccassi <bluca@debian.org>
Wed, 3 Aug 2022 17:41:13 +0000 (18:41 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 3 Aug 2022 23:58:57 +0000 (00:58 +0100)
commit872f9da4d8b67b012f1b1b227416d0c99bcdf43c
treee1f819a243389821d69e2b67d60861748f23da4f
parent29e804dffd52496aaad2d0fc6a50d18a9940010d
integritysetup: do not use crypt_init_data_device after crypt_init

crypt_init_data_device() replaces the crypt_device struct with a
new allocation, losing the old one, which we get from crypt_init().
Use crypt_set_data_device() instead.

Enhance the test to cover this option too.
src/integritysetup/integritysetup.c
test/units/testsuite-67.sh