VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-10-25 13:06:14 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-10-25 14:47:44 +0200
commitfaa541f613ffc9ebe3e53a84f448936d033e0a80 (patch)
tree754d7cc8162b9879ef11abb1d98210ea1bffaa30 /src
parent318b00b6a2146a3739b2f17a159366efb53e5eca (diff)
downloadVeraCrypt-faa541f613ffc9ebe3e53a84f448936d033e0a80.tar.gz
VeraCrypt-faa541f613ffc9ebe3e53a84f448936d033e0a80.zip
Windows: for system encryption case, also perform automatic fix of boot configuration if MBR boot used and not only EFI.
Diffstat (limited to 'src')
-rw-r--r--src/Mount/Mount.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index 4ee32dfb..2837d449 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -9422,25 +9422,21 @@ static DWORD WINAPI SystemFavoritesServiceCtrlHandler ( DWORD dwControl,
case SERVICE_CONTROL_STOP:
SystemFavoritesServiceSetStatus (SERVICE_STOP_PENDING);
- if (bSystemIsGPT)
+ if (!(BootEncObj->ReadServiceConfigurationFlags () & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_UPDATE_LOADER))
{
- uint32 serviceFlags = BootEncObj->ReadServiceConfigurationFlags ();
- if (!(serviceFlags & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_UPDATE_LOADER))
+ try
{
- try
- {
- BootEncryption::UpdateSetupConfigFile (true);
- if (!BootEncStatus.HiddenSystem)
- {
- // re-install our bootloader again in case the update process has removed it.
- BootEncryption bootEnc (NULL, true);
- bootEnc.InstallBootLoader (true);
- }
- }
- catch (...)
+ BootEncryption::UpdateSetupConfigFile (true);
+ if (!BootEncStatus.HiddenSystem)
{
+ // re-install our bootloader again in case the update process has removed it.
+ BootEncryption bootEnc (NULL, true);
+ bootEnc.InstallBootLoader (true);
}
}
+ catch (...)
+ {
+ }
}
/* clear VC_DRIVER_CONFIG_CLEAR_KEYS_ON_NEW_DEVICE_INSERTION flag */