mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows: Implement support for mounting partially encrypted system partitions
For now, we force ReadOnly mounting for such partitions.
This commit is contained in:
@@ -3156,6 +3156,21 @@ VOID VolumeThreadProc (PVOID Context)
|
||||
Extension->Queue.HostFileHandle = Extension->hDeviceFile;
|
||||
Extension->Queue.VirtualDeviceLength = Extension->DiskLength;
|
||||
Extension->Queue.MaxReadAheadOffset.QuadPart = Extension->HostLength;
|
||||
if (bDevice && pThreadBlock->mount->bPartitionInInactiveSysEncScope
|
||||
&& (!Extension->cryptoInfo->hiddenVolume)
|
||||
&& (Extension->cryptoInfo->EncryptedAreaLength.Value != Extension->cryptoInfo->VolumeSize.Value)
|
||||
)
|
||||
{
|
||||
// Support partial encryption only in the case of system encryption
|
||||
Extension->Queue.EncryptedAreaStart = 0;
|
||||
Extension->Queue.EncryptedAreaEnd = Extension->cryptoInfo->EncryptedAreaLength.Value - 1;
|
||||
if (Extension->Queue.CryptoInfo->EncryptedAreaLength.Value == 0)
|
||||
{
|
||||
Extension->Queue.EncryptedAreaStart = -1;
|
||||
Extension->Queue.EncryptedAreaEnd = -1;
|
||||
}
|
||||
Extension->Queue.bSupportPartialEncryption = TRUE;
|
||||
}
|
||||
|
||||
if (Extension->SecurityClientContextValid)
|
||||
Extension->Queue.SecurityClientContext = &Extension->SecurityClientContext;
|
||||
|
||||
Reference in New Issue
Block a user