VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-10-26 22:49:37 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-10-27 02:04:34 +0200
commitca46cf928ae763aab639ac943a40633fdac3389e (patch)
tree0d85d46219f7770b7afc2ba420d96493903de405 /src/Mount
parentf22abf93dda59ec4289fd8f259eac384b14262a4 (diff)
downloadVeraCrypt-ca46cf928ae763aab639ac943a40633fdac3389e.tar.gz
VeraCrypt-ca46cf928ae763aab639ac943a40633fdac3389e.zip
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 2837d449..bde729ee 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);
}
}