diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2023-08-13 22:50:37 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2023-08-13 22:50:37 +0200 |
commit | f84d235cf17a92bb51031833da502660d364013f (patch) | |
tree | 4fd5284f0b5f83d6f7ba9d3d8f5e2700f904ca39 /src/Common | |
parent | 8c7962bda7ea260049226fe99a351675fd0780a2 (diff) | |
download | VeraCrypt-f84d235cf17a92bb51031833da502660d364013f.tar.gz VeraCrypt-f84d235cf17a92bb51031833da502660d364013f.zip |
Windows: Implement support for mounting partially encrypted system partitions
For now, we force ReadOnly mounting for such partitions.
Diffstat (limited to 'src/Common')
-rw-r--r-- | src/Common/Apidrvr.h | 1 | ||||
-rw-r--r-- | src/Common/Dlgcode.c | 11 | ||||
-rw-r--r-- | src/Common/Language.xml | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/Common/Apidrvr.h b/src/Common/Apidrvr.h index d8bfc74f..7a3ea868 100644 --- a/src/Common/Apidrvr.h +++ b/src/Common/Apidrvr.h @@ -166,6 +166,7 @@ typedef struct BOOL RecoveryMode; int pkcs5_prf; int ProtectedHidVolPkcs5Prf; + BOOL VolumeMountedReadOnlyAfterPartialSysEnc; uint32 BytesPerPhysicalSector; int VolumePim; int ProtectedHidVolPim; diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 6739a7a3..a9be17c9 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -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 diff --git a/src/Common/Language.xml b/src/Common/Language.xml index 1abee9d6..4cd959c5 100644 --- a/src/Common/Language.xml +++ b/src/Common/Language.xml @@ -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"> |