summaryrefslogtreecommitdiff
path: root/shim.c
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2015-06-11 13:20:09 -0400
committerPeter Jones <pjones@redhat.com>2015-06-11 13:20:09 -0400
commitb9f98904ba133f437ced3660b3b9f033f02244ec (patch)
treefda359f31ebcb1cfb4d0a07edfee966a8164dcbd /shim.c
parent8837b9054f544fd9701cf0bd4b1bd4e596f4c2e7 (diff)
downloadefi-boot-shim-b9f98904ba133f437ced3660b3b9f033f02244ec.tar.gz
efi-boot-shim-b9f98904ba133f437ced3660b3b9f033f02244ec.zip
Don't leave in_protocol==1 when shim_verify() isn't enforcing.
Right now if shim_verify() sees secure_mode()==0, it exits with EFI_SUCCESS, but accidentally leaves in_protocol=1. This means any other call will have supressed error/warning messages. That's wrong, so don't do it. Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'shim.c')
-rw-r--r--shim.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/shim.c b/shim.c
index d66c549c..99b0d0e2 100644
--- a/shim.c
+++ b/shim.c
@@ -1521,17 +1521,16 @@ error:
*/
EFI_STATUS shim_verify (void *buffer, UINT32 size)
{
- EFI_STATUS status;
+ EFI_STATUS status = EFI_SUCCESS;
PE_COFF_LOADER_IMAGE_CONTEXT context;
loader_is_participating = 1;
in_protocol = 1;
if (!secure_mode())
- return EFI_SUCCESS;
+ goto done;
status = read_header(buffer, size, &context);
-
if (status != EFI_SUCCESS)
goto done;