VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-10-26 20:49:37 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-10-27 00:04:34 (GMT)
commitca46cf928ae763aab639ac943a40633fdac3389e (patch)
tree0d85d46219f7770b7afc2ba420d96493903de405 /src/Mount
parentf22abf93dda59ec4289fd8f259eac384b14262a4 (diff)
downloadVeraCrypt-ca46cf928ae763aab639ac943a40633fdac3389e.zip
VeraCrypt-ca46cf928ae763aab639ac943a40633fdac3389e.tar.gz
Windows: Update EFI NVRAM variable only if changed or doesn't exist and add configuration to force setting EFI BootNext to veraCrypt bootloader before each shutdown
Diffstat (limited to 'src/Mount')
-rw-r--r--src/Mount/Mount.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index 2837d44..bde729e 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -9430,7 +9430,10 @@ static DWORD WINAPI SystemFavoritesServiceCtrlHandler ( DWORD dwControl,
if (!BootEncStatus.HiddenSystem)
{
// re-install our bootloader again in case the update process has removed it.
- BootEncryption bootEnc (NULL, true);
+ bool bForceSetNextBoot = false;
+ if (BootEncObj->ReadServiceConfigurationFlags () & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_FORCE_SET_BOOTNEXT)
+ bForceSetNextBoot = true;
+ BootEncryption bootEnc (NULL, true, bForceSetNextBoot);
bootEnc.InstallBootLoader (true);
}
}