dislocker
dislocker copied to clipboard
Really open disk as read only and do not use encrypted_volume_size metadata
I am sharing these 2 commits:
- In my personal use case, I only mount as read-only the bitlocker volume, and I wanted to be sure that there will not have any modification to the volume. So open the disk device as requested by command line arguments
- After shrinking the bitlocker volume using "Disk Management" Windows 10 version 1909, the encrypted_volume_size metadata field is not updated, so do not trust it... Use instead the partition size.
It is not recommended to merge regarding the modification of encrypted_volume_size, as the value will not be updated when shrinking Bitlocker. That does not have any effect. If the Bitlocker is extended, the value will be updated automatically. In addition, it is not recommedended to use ioctl. If it is an image file, then it is meaningless to use ioctl.