VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-11-22 00:08:41 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-11-22 00:11:55 +0100
commit9741c9209d0deedcc5d60434e5e7df3c531ff192 (patch)
tree30ceb447e59fba6167784ef070ab2884c57c0456 /src/Mount
parent55efa6237a8e35ee3788b0eecc6e4013d22f9692 (diff)
downloadVeraCrypt-9741c9209d0deedcc5d60434e5e7df3c531ff192.tar.gz
VeraCrypt-9741c9209d0deedcc5d60434e5e7df3c531ff192.zip
Windows: Add new registry flags for SystemFavoritesService to control updating of EFI BIOS boot menu on shutdown. This will help better manage multi-boot scenarios where we should not mess up with boot order (e.g. grub2 case)
Diffstat (limited to 'src/Mount')
-rw-r--r--src/Mount/Mount.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index 9ba4ae86..7f677580 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -9436,9 +9436,16 @@ static DWORD WINAPI SystemFavoritesServiceCtrlHandler ( DWORD dwControl,
{
// re-install our bootloader again in case the update process has removed it.
bool bForceSetNextBoot = false;
- if (BootEncObj->ReadServiceConfigurationFlags () & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_FORCE_SET_BOOTNEXT)
+ bool bSetBootentry = true;
+ bool bForceFirstBootEntry = true;
+ uint32 flags = BootEncObj->ReadServiceConfigurationFlags ();
+ if (flags & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_FORCE_SET_BOOTNEXT)
bForceSetNextBoot = true;
- BootEncryption bootEnc (NULL, true, bForceSetNextBoot);
+ if (flags & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_SET_BOOTENTRY)
+ bSetBootentry = false;
+ if (flags & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_FORCE_FIRST_BOOTENTRY)
+ bForceFirstBootEntry = false;
+ BootEncryption bootEnc (NULL, true, bSetBootentry, bForceFirstBootEntry, bForceSetNextBoot);
bootEnc.InstallBootLoader (true);
}
}