Skip to content

Commit

Permalink
MdeModulePkg/Variable: Attribute combination should return EFI_UNSUPP…
Browse files Browse the repository at this point in the history
…ORTED

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4341

Commit 21320ef broke some tests in the AuthVar_Conf test
in edk2-test.  There are 2 testcases that invoke SetVariable
with the following attribute value:

(EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS)

EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and the UEFI spec
says this should return EFI_UNSUPPORTED.

Cc: Liming Gao <[email protected]>
Cc: Hao A Wu <[email protected]>
Cc: Sunny Wang <[email protected]>

Signed-off-by: Stuart Yoder <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Reviewed-by: Sunny Wang <[email protected]>
  • Loading branch information
stuyod01 authored and mergify[bot] committed Feb 15, 2023
1 parent 090642d commit 68c1bed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
Original file line number Diff line number Diff line change
Expand Up @@ -2676,7 +2676,11 @@ VariableServiceSetVariable (
//
// Only EFI_VARIABLE_NON_VOLATILE attribute is invalid
//
return EFI_INVALID_PARAMETER;
if ((Attributes & EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) != 0) {
return EFI_UNSUPPORTED;
} else {
return EFI_INVALID_PARAMETER;
}
} else if ((Attributes & VARIABLE_ATTRIBUTE_AT_AW) != 0) {
if (!mVariableModuleGlobal->VariableGlobal.AuthSupport) {
//
Expand Down

0 comments on commit 68c1bed

Please sign in to comment.