mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-12 03:10:08 +01:00
Fix disk wipe (during keyslot removal) if used on 4k hw block device.
The "Gutmann" metod uses various offset, direct-io need to even read device when working with buffer... Fixes Issue 129.
This commit is contained in:
@@ -133,7 +133,7 @@ int crypt_wipe(const char *device,
|
||||
if (!buffer)
|
||||
return -ENOMEM;
|
||||
|
||||
flags = O_WRONLY | O_DIRECT | O_SYNC;
|
||||
flags = O_RDWR | O_DIRECT | O_SYNC;
|
||||
|
||||
/* use O_EXCL only for block devices */
|
||||
if (exclusive && S_ISBLK(st.st_mode))
|
||||
|
||||
Reference in New Issue
Block a user