diff options
author | kavsrf <kavsrf@gmail.com> | 2017-06-16 21:15:04 +0300 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-06-18 15:52:11 +0200 |
commit | ed149d5104f35ab52edd7579f2c956382e7d617f (patch) | |
tree | 670192176e3a5281999a4089bf771731371c6b43 /DcsBoot | |
parent | 764556463ff132bd3a10d6c29e219bb10d523206 (diff) | |
download | VeraCrypt-DCS-ed149d5104f35ab52edd7579f2c956382e7d617f.tar.gz VeraCrypt-DCS-ed149d5104f35ab52edd7579f2c956382e7d617f.zip |
BML flags added
Diffstat (limited to 'DcsBoot')
-rw-r--r-- | DcsBoot/DcsBoot.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/DcsBoot/DcsBoot.c b/DcsBoot/DcsBoot.c index de79e93..f897a48 100644 --- a/DcsBoot/DcsBoot.c +++ b/DcsBoot/DcsBoot.c @@ -18,6 +18,7 @@ https://opensource.org/licenses/LGPL-3.0 #include <Library/DevicePathLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/PrintLib.h>
+#include <Protocol/DcsBmlProto.h>
#include "DcsConfig.h"
#include <Guid/Gpt.h>
#include <Guid/GlobalVariable.h>
@@ -37,6 +38,11 @@ DoExecCmd() if (!EFI_ERROR(res)) {
res = FileOpenRoot(gFileRootHandle, &gFileRoot);
if (!EFI_ERROR(res)) {
+ UINT32 lockFlags = 0;
+ // Lock EFI boot variables
+ InitBml();
+ lockFlags = ConfigReadInt("DcsBmlLockFlags", BML_LOCK_SETVARIABLE | BML_SET_BOOTNEXT | BML_UPDATE_BOOTORDER);
+ BmlLock(lockFlags);
res = EfiExec(NULL, gEfiExecCmd);
AsciiSPrint(gDoExecCmdMsg, sizeof(gDoExecCmdMsg), "\nCan't exec %s start partition %g\n", gEfiExecCmd, gEfiExecPartGuid);
} else {
|