From 09f11d6aaec16bf1519c8113f3daf61ce121fc32 Mon Sep 17 00:00:00 2001 From: Gary Ching-Pang Lin Date: Wed, 24 Jul 2013 14:39:39 +0800 Subject: [PATCH] MokManager: reboot the system after clearing MOK password --- MokManager.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MokManager.c b/MokManager.c index db3f4c0..74167c8 100644 --- a/MokManager.c +++ b/MokManager.c @@ -1122,7 +1122,11 @@ static INTN mok_pw_prompt (void *MokPW, UINTN MokPWSize) { LibDeleteVariable(L"MokPWStore", &shim_lock_guid); LibDeleteVariable(L"MokPW", &shim_lock_guid); - return 0; + console_notify(L"The system must now be rebooted"); + uefi_call_wrapper(RT->ResetSystem, 4, EfiResetWarm, EFI_SUCCESS, 0, + NULL); + console_notify(L"Failed to reboot"); + return -1; } if (MokPWSize == PASSWORD_CRYPT_SIZE) {