mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 19:08:26 -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:
@@ -166,6 +166,7 @@ typedef struct
|
||||
BOOL RecoveryMode;
|
||||
int pkcs5_prf;
|
||||
int ProtectedHidVolPkcs5Prf;
|
||||
BOOL VolumeMountedReadOnlyAfterPartialSysEnc;
|
||||
uint32 BytesPerPhysicalSector;
|
||||
int VolumePim;
|
||||
int ProtectedHidVolPim;
|
||||
|
||||
@@ -9253,6 +9253,17 @@ retry:
|
||||
}
|
||||
}
|
||||
|
||||
if (mount.VolumeMountedReadOnlyAfterPartialSysEnc
|
||||
&& !Silent
|
||||
&& bDevice)
|
||||
{
|
||||
wchar_t msg[1024];
|
||||
wchar_t mountPoint[] = { L'A' + (wchar_t) driveNo, L':', 0 };
|
||||
StringCbPrintfW (msg, sizeof(msg), GetString ("PARTIAL_SYSENC_MOUNT_READONLY"), mountPoint);
|
||||
|
||||
WarningDirect (msg, hwndDlg);
|
||||
}
|
||||
|
||||
if (mount.wszLabel[0] && !mount.bDriverSetLabel)
|
||||
{
|
||||
// try setting the drive label on user-mode using registry
|
||||
|
||||
@@ -1631,6 +1631,7 @@
|
||||
<entry lang="en" key="EXPANDER_MOUNTING_VOLUME">Mounting volume ...\n</entry>
|
||||
<entry lang="en" key="EXPANDER_UNMOUNTING_VOLUME">Unmounting volume ...\n</entry>
|
||||
<entry lang="en" key="EXPANDER_EXTENDING_FILESYSTEM">Extending file system ...\n</entry>
|
||||
<entry lang="en" key="PARTIAL_SYSENC_MOUNT_READONLY">Warning: The system partition you attempted to mount was not fully encrypted. As a safety measure to prevent potential corruption or unwanted modifications, volume '%s' was mounted as read-only.</entry>
|
||||
</localization>
|
||||
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="VeraCrypt">
|
||||
|
||||
Reference in New Issue
Block a user