mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/Variable/RuntimeDxe: permit MorLock deletion for passthru req
The SetMorLockVariable() function sets "mMorLockPassThru" to TRUE temporarily, so that it can set the MOR Control Lock variable to well-formed values without permission checks. In the next patch, we'll need the same override for deleting the MOR Control Lock variable; hence obey "mMorLockPassThru" in the deletion branch of SetVariableCheckHandlerMorLock() as well. Cc: Eric Dong <eric.dong@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Ladi Prosek <lprosek@redhat.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Tested-by: Ladi Prosek <lprosek@redhat.com>
This commit is contained in:
parent
f130428043
commit
e3531164cc
|
@ -169,7 +169,10 @@ SetVariableCheckHandlerMorLock (
|
||||||
// Basic Check
|
// Basic Check
|
||||||
//
|
//
|
||||||
if (Attributes == 0 || DataSize == 0 || Data == NULL) {
|
if (Attributes == 0 || DataSize == 0 || Data == NULL) {
|
||||||
return EFI_WRITE_PROTECTED;
|
//
|
||||||
|
// Permit deletion for passthru request, deny it otherwise.
|
||||||
|
//
|
||||||
|
return mMorLockPassThru ? EFI_SUCCESS : EFI_WRITE_PROTECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Attributes != (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS)) ||
|
if ((Attributes != (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS)) ||
|
||||||
|
|
Loading…
Reference in New Issue