VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DcsBoot/DcsBoot.c5
-rw-r--r--DcsCfg/DcsCfgCrypt.c4
-rw-r--r--DcsInt/DcsInt.c6
-rw-r--r--Include/Library/CommonLib.h1
4 files changed, 11 insertions, 5 deletions
diff --git a/DcsBoot/DcsBoot.c b/DcsBoot/DcsBoot.c
index d4f4d56..18fb005 100644
--- a/DcsBoot/DcsBoot.c
+++ b/DcsBoot/DcsBoot.c
@@ -183,6 +183,11 @@ DcsBootMain(
{
EfiCpuHalt();
}
+ else if (res == EFI_DCS_USER_CANCELED)
+ {
+ /* If user cancels password prompt, call original Windows loader */
+ res = EfiExec(NULL, gEfiExecCmdDefault);
+ }
return res;
}
diff --git a/DcsCfg/DcsCfgCrypt.c b/DcsCfg/DcsCfgCrypt.c
index 2d5497b..53e03a1 100644
--- a/DcsCfg/DcsCfgCrypt.c
+++ b/DcsCfg/DcsCfgCrypt.c
@@ -167,7 +167,7 @@ ChangePassword(
ZeroMem(&confirmPassword, sizeof(newPassword));
VCAskPwd(AskPwdNew, &newPassword);
if (gAuthPwdCode == AskPwdRetCancel) {
- return EFI_NOT_READY;
+ return EFI_DCS_USER_CANCELED;
}
if (gAuthPwdCode == AskPwdRetTimeout) {
return EFI_TIMEOUT;
@@ -175,7 +175,7 @@ ChangePassword(
VCAskPwd(AskPwdConfirm, &confirmPassword);
if (gAuthPwdCode == AskPwdRetCancel) {
MEM_BURN(&newPassword, sizeof(newPassword));
- return EFI_NOT_READY;
+ return EFI_DCS_USER_CANCELED;
}
if (gAuthPwdCode == AskPwdRetTimeout) {
MEM_BURN(&newPassword, sizeof(newPassword));
diff --git a/DcsInt/DcsInt.c b/DcsInt/DcsInt.c
index 8b6c803..8133726 100644
--- a/DcsInt/DcsInt.c
+++ b/DcsInt/DcsInt.c
@@ -563,7 +563,7 @@ SecRegionChangePwd() {
ZeroMem(&confirmPassword, sizeof(newPassword));
VCAskPwd(AskPwdNew, &newPassword);
if (gAuthPwdCode == AskPwdRetCancel) {
- return EFI_NOT_READY;
+ return EFI_DCS_USER_CANCELED;
}
if (gAuthPwdCode == AskPwdRetTimeout) {
return EFI_TIMEOUT;
@@ -571,7 +571,7 @@ SecRegionChangePwd() {
VCAskPwd(AskPwdConfirm, &confirmPassword);
if (gAuthPwdCode == AskPwdRetCancel) {
MEM_BURN(&newPassword, sizeof(newPassword));
- return EFI_NOT_READY;
+ return EFI_DCS_USER_CANCELED;
}
if (gAuthPwdCode == AskPwdRetTimeout) {
MEM_BURN(&newPassword, sizeof(newPassword));
@@ -682,7 +682,7 @@ SecRegionTryDecrypt()
SecRegionOffset = 0;
VCAuthAsk();
if (gAuthPwdCode == AskPwdRetCancel) {
- return EFI_NOT_READY;
+ return EFI_DCS_USER_CANCELED;
}
if (gAuthPwdCode == AskPwdRetTimeout) {
return EFI_TIMEOUT;
diff --git a/Include/Library/CommonLib.h b/Include/Library/CommonLib.h
index d0db41f..4d207ca 100644
--- a/Include/Library/CommonLib.h
+++ b/Include/Library/CommonLib.h
@@ -31,6 +31,7 @@ https://opensource.org/licenses/LGPL-3.0
#define EFI_DCS_SHUTDOWN_REQUESTED ENCODE_ERROR(0xDC50001)
#define EFI_DCS_REBOOT_REQUESTED ENCODE_ERROR(0xDC50002)
#define EFI_DCS_HALT_REQUESTED ENCODE_ERROR(0xDC50003)
+#define EFI_DCS_USER_CANCELED ENCODE_ERROR(0xDC50004)
//////////////////////////////////////////////////////////////////////////
// Check error