mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-06 13:22:58 +00:00
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:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user