This module adds Variable Hook and check MemoryOverwriteRequestControlLock.\r
\r
Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) Microsoft Corporation.\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
#include <Library/BaseMemoryLib.h>\r
#include "Variable.h"\r
\r
+#include <Protocol/VariablePolicy.h>\r
+\r
+#include <Library/VariablePolicyLib.h>\r
+\r
typedef struct {\r
CHAR16 *VariableName;\r
EFI_GUID *VendorGuid;\r
return EFI_SUCCESS;\r
}\r
\r
+ // Permit deletion when policy is disabled.\r
+ if (!IsVariablePolicyEnabled() && ((Attributes == 0) || (DataSize == 0))) {\r
+ return EFI_SUCCESS;\r
+ }\r
+\r
//\r
// MorLock variable\r
//\r