mjg59/shim — pull request #16 by gaudenz (2013-11-06 17:25:56+00:00)
Title: Fix detection of SetupMode in secure_mode

This was broken by commit 556c445ea19fc257fe35ac1a67477e7352ba3fcd. The
previous code assumes setup mode even if just the SetupMode variable is
present but not set to 1. If get_variable returns EFI_SUCCESS, this only
means that the variable was read successfully and does not tell anything
about it's value. And as we already checked if secure boot is enabled, the
function should return TRUE anyway.

This is a security fix as in setup mode shim will load unsigned code!

@vathpela: please check this commit, it fixes something you broke some days ago.