mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows: for system encryption case, also perform automatic fix of boot configuration if MBR boot used and not only EFI.
This commit is contained in:
@@ -9422,25 +9422,21 @@ static DWORD WINAPI SystemFavoritesServiceCtrlHandler ( DWORD dwControl,
|
|||||||
case SERVICE_CONTROL_STOP:
|
case SERVICE_CONTROL_STOP:
|
||||||
SystemFavoritesServiceSetStatus (SERVICE_STOP_PENDING);
|
SystemFavoritesServiceSetStatus (SERVICE_STOP_PENDING);
|
||||||
|
|
||||||
if (bSystemIsGPT)
|
if (!(BootEncObj->ReadServiceConfigurationFlags () & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_UPDATE_LOADER))
|
||||||
{
|
{
|
||||||
uint32 serviceFlags = BootEncObj->ReadServiceConfigurationFlags ();
|
try
|
||||||
if (!(serviceFlags & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_UPDATE_LOADER))
|
|
||||||
{
|
{
|
||||||
try
|
BootEncryption::UpdateSetupConfigFile (true);
|
||||||
{
|
if (!BootEncStatus.HiddenSystem)
|
||||||
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 (...)
|
|
||||||
{
|
{
|
||||||
|
// 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 */
|
/* clear VC_DRIVER_CONFIG_CLEAR_KEYS_ON_NEW_DEVICE_INSERTION flag */
|
||||||
|
|||||||
Reference in New Issue
Block a user