luks_device: add built-in signature wiper to work around older wipefs versions with LUKS2 containers (#327)

* Use 'cryptsetup erase' to kill LUKS signature.

* Adjust unit test.

* Use own wiper for LUKS headers.

* Add comments.

* Fix tests.

* Update changelog.

* Remove 'cryptsetup erase'.

* Improve error messages.
This commit is contained in:
Felix Fontein
2021-11-11 06:59:35 +01:00
committed by GitHub
parent 91d98c4413
commit ebbfd7c56f
3 changed files with 42 additions and 1 deletions

View File

@@ -58,6 +58,9 @@ def test_run_luks_remove(monkeypatch):
monkeypatch.setattr(luks_device.Handler,
"_run_command",
run_command_check)
monkeypatch.setattr(luks_device,
"wipe_luks_headers",
lambda device: True)
crypt = luks_device.CryptHandler(module)
crypt.run_luks_remove("dummy")