From 2d4d3ab4ed0ee86d46fe2b44ca1e56a3d2916f68 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 8 Nov 2019 23:06:25 +0100 Subject: Fix "ActionFailed" not working and add "ActionCancelled" to customize handling of user hitting ESC on password prompt --- Library/VeraCryptLib/DcsVeraCrypt.c | 3 +++ Library/VeraCryptLib/DcsVeraCrypt.h | 1 + 2 files changed, 4 insertions(+) (limited to 'Library') diff --git a/Library/VeraCryptLib/DcsVeraCrypt.c b/Library/VeraCryptLib/DcsVeraCrypt.c index 4cf0e05..c3e8a39 100644 --- a/Library/VeraCryptLib/DcsVeraCrypt.c +++ b/Library/VeraCryptLib/DcsVeraCrypt.c @@ -82,6 +82,7 @@ CHAR8* gOnExitFailed = NULL; CHAR8* gOnExitSuccess = NULL; CHAR8* gOnExitNotFound = NULL; CHAR8* gOnExitTimeout = NULL; +CHAR8* gOnExitCancelled = NULL; ////////////////////////////////////////////////////////////////////////// // Authorize @@ -184,6 +185,8 @@ VCAuthLoadConfig() ConfigReadString("ActionFailed", "Exit", gOnExitFailed, MAX_MSG); VCCONFIG_ALLOC(gOnExitTimeout, MAX_MSG); ConfigReadString("ActionTimeout", "Shutdown", gOnExitTimeout, MAX_MSG); + VCCONFIG_ALLOC(gOnExitCancelled, MAX_MSG); + ConfigReadString("ActionCancelled", "Exit", gOnExitCancelled, MAX_MSG); strTemp = MEM_ALLOC(MAX_MSG); ConfigReadString("PartitionGuidOS", "", strTemp, MAX_MSG); diff --git a/Library/VeraCryptLib/DcsVeraCrypt.h b/Library/VeraCryptLib/DcsVeraCrypt.h index 152a335..1f25ae9 100644 --- a/Library/VeraCryptLib/DcsVeraCrypt.h +++ b/Library/VeraCryptLib/DcsVeraCrypt.h @@ -75,6 +75,7 @@ extern CHAR8* gOnExitFailed; extern CHAR8* gOnExitSuccess; extern CHAR8* gOnExitNotFound; extern CHAR8* gOnExitTimeout; +extern CHAR8* gOnExitCancelled; void VCAuthAsk(); -- cgit v1.2.3