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

* 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.

(cherry picked from commit ebbfd7c56f)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot]
2021-11-11 07:17:45 +01:00
committed by GitHub
parent f315722b31
commit 426d70fbcf
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")