diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-03-21 20:57:16 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-03-21 20:57:16 +0100 |
commit | 4922daee362adf600fd19f91aa11cc603d8d17e1 (patch) | |
tree | d2e6e30739af3122661d961dca21bf58e0685dc9 /Library/PasswordLib | |
parent | c2582cc9a199b606835e8cdbf37991778efede4a (diff) | |
download | VeraCrypt-DCS-4922daee362adf600fd19f91aa11cc603d8d17e1.tar.gz VeraCrypt-DCS-4922daee362adf600fd19f91aa11cc603d8d17e1.zip |
Implement better timeout mechanism for password input. Implement new actions "shutdown" and "reboot". Set default timeout value to 3 minutes and default timeout action to "shutdown"
Diffstat (limited to 'Library/PasswordLib')
-rw-r--r-- | Library/PasswordLib/ConsolePassword.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/PasswordLib/ConsolePassword.c b/Library/PasswordLib/ConsolePassword.c index 43e03e6..0b2d3c6 100644 --- a/Library/PasswordLib/ConsolePassword.c +++ b/Library/PasswordLib/ConsolePassword.c @@ -36,12 +36,12 @@ AskConsolePwdInt( UINTN EventIndex = 0;
InputEvents[0] = gST->ConIn->WaitForKey;
gBS->CreateEvent(EVT_TIMER, 0, (EFI_EVENT_NOTIFY)NULL, NULL, &InputEvents[1]);
- gBS->SetTimer(InputEvents[1], TimerPeriodic, 10000000 * gPasswordTimeout);
+ gBS->SetTimer(InputEvents[1], TimerRelative, 10000000 * gPasswordTimeout);
gBS->WaitForEvent(2, InputEvents, &EventIndex);
- gPasswordTimeout = 0;
+ gBS->SetTimer(InputEvents[1], TimerCancel, 0);
gBS->CloseEvent(InputEvents[1]);
if (EventIndex == 1) {
- *retCode = AskPwdRetCancel;
+ *retCode = AskPwdRetTimeout;
return ;
}
}
|