VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/DcsInt/DcsInt.c
diff options
context:
space:
mode:
authorkavsrf <kavsrf@gmail.com>2017-02-02 11:40:40 +0300
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-05 17:36:54 +0200
commitd200f27ac3b8a4f58e52a5ee798e11e3fdf74924 (patch)
treec2ed641d00203d91732911241d22a92e48bc1d4a /DcsInt/DcsInt.c
parent8051ac7985a2cef1e561fdf1f4258ae640d3735b (diff)
downloadVeraCrypt-DCS-d200f27ac3b8a4f58e52a5ee798e11e3fdf74924.tar.gz
VeraCrypt-DCS-d200f27ac3b8a4f58e52a5ee798e11e3fdf74924.zip
double reboot in pre-test phase
force boot messages
Diffstat (limited to 'DcsInt/DcsInt.c')
-rw-r--r--DcsInt/DcsInt.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/DcsInt/DcsInt.c b/DcsInt/DcsInt.c
index 1499069..e792993 100644
--- a/DcsInt/DcsInt.c
+++ b/DcsInt/DcsInt.c
@@ -994,20 +994,31 @@ UefiMain(
if (!devFound) return OnExit(gOnExitNotFound, OnExitAuthNotFound, EFI_NOT_FOUND);
}
- // Try to find by OS partition GUID
- if (SecRegionData == NULL && gPartitionGuidOS != NULL) {
- UINTN i;
- for (i = 0; i < gBIOCount; ++i) {
- EFI_GUID guid;
- res = EfiGetPartGUID(gBIOHandles[i], &guid);
- if(EFI_ERROR(res)) continue;
- if (memcmp(gPartitionGuidOS, &guid, sizeof(guid)) == 0) {
- res = SecRegionLoadDefault(gBIOHandles[i]);
- if (EFI_ERROR(res)) {
- return OnExit(gOnExitNotFound, OnExitAuthNotFound, res);
+ // Force authorization
+ if (SecRegionData == NULL && gDcsBootForce != 0) {
+ res = EFI_NOT_FOUND;
+ if (gPartitionGuidOS != NULL) {
+ // Try to find by OS partition GUID
+ UINTN i;
+ for (i = 0; i < gBIOCount; ++i) {
+ EFI_GUID guid;
+ res = EfiGetPartGUID(gBIOHandles[i], &guid);
+ if (EFI_ERROR(res)) continue;
+ if (memcmp(gPartitionGuidOS, &guid, sizeof(guid)) == 0) {
+ res = SecRegionLoadDefault(gBIOHandles[i]);
+ break;
}
}
+ } else {
+ res = SecRegionLoadDefault(gFileRootHandle);
+ }
+ if (EFI_ERROR(res)) {
+ return OnExit(gOnExitNotFound, OnExitAuthNotFound, res);
}
+ // force password type and message
+ gAuthPasswordType = gForcePasswordType;
+ gAuthPasswordMsg = gForcePasswordMsg;
+ gPasswordProgress = gForcePasswordProgress;
}
// ask any way? (by DcsBoot flag)