[edk2-devel] [PATCH 3/5] MdeModulePkg/SecurityLockAuditLibNull: Add null version lib

Gao, Zhichao zhichao.gao at intel.com
Mon Jul 22 04:02:02 UTC 2019


From: Bret Barkelew <Bret.Barkelew at microsoft.com>

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

Add a null version library instance of SecurityLockAuditLib.
It provides the new API SecurityLockReportEvent without any
function.

Cc: Jian J Wang <jian.j.wang at intel.com>
Cc: Hao A Wu <hao.a.wu at intel.com>
Cc: Ray Ni <ray.ni at intel.com>
Cc: Star Zeng <star.zeng at intel.com>
Cc: Liming gao <liming.gao at intel.com>
Cc: Sean Brogan <sean.brogan at microsoft.com>
Cc: Michael Turner <Michael.Turner at microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew at microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao at intel.com>
---
 .../SecurityLockAuditLibNull.c                | 32 +++++++++++++++++++
 .../SecurityLockAuditLibNull.inf              | 27 ++++++++++++++++
 2 files changed, 59 insertions(+)
 create mode 100644 MdeModulePkg/Library/SecurityLockAuditLibNull/SecurityLockAuditLibNull.c
 create mode 100644 MdeModulePkg/Library/SecurityLockAuditLibNull/SecurityLockAuditLibNull.inf

diff --git a/MdeModulePkg/Library/SecurityLockAuditLibNull/SecurityLockAuditLibNull.c b/MdeModulePkg/Library/SecurityLockAuditLibNull/SecurityLockAuditLibNull.c
new file mode 100644
index 0000000000..47a26684d3
--- /dev/null
+++ b/MdeModulePkg/Library/SecurityLockAuditLibNull/SecurityLockAuditLibNull.c
@@ -0,0 +1,32 @@
+/** @file
+
+  Null library for security lock logging that does nothing but meet compile requirements
+
+  Copyright (c) 2018, Microsoft Corporation
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Base.h>
+#include <Library/SecurityLockAuditLib.h>
+
+/**
+  Null function for security Lock event logging and reporting
+
+  @param[in] Module                   GUID of calling module
+  @param[in] Function                 Name of calling function
+  @param[in] LockEventText            Event text explaining what is locked
+  @param[in] LockType                 Enumerated lock type for differentiation
+
+**/
+VOID
+EFIAPI
+SecurityLockReportEvent (
+  IN GUID           *Module,
+  IN CONST CHAR8    *Function,
+  IN CONST CHAR8    *LockEventText,
+  IN LOCK_TYPE      LockType
+  )
+{
+}
diff --git a/MdeModulePkg/Library/SecurityLockAuditLibNull/SecurityLockAuditLibNull.inf b/MdeModulePkg/Library/SecurityLockAuditLibNull/SecurityLockAuditLibNull.inf
new file mode 100644
index 0000000000..bf3f9fc0b0
--- /dev/null
+++ b/MdeModulePkg/Library/SecurityLockAuditLibNull/SecurityLockAuditLibNull.inf
@@ -0,0 +1,27 @@
+## @file
+#
+#  Null library for security lock logging that does nothing but meet compile requirements
+#
+#
+# Copyright (c) 2018, Microsoft Corporation
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+[Defines]
+  INF_VERSION                    = 0x00010005
+  BASE_NAME                      = SecurityLockAuditLibNull
+  FILE_GUID                      = 1d333a6a-90a7-45cb-9897-0a172ee35066
+  MODULE_TYPE                    = BASE
+  VERSION_STRING                 = 1.0
+  LIBRARY_CLASS                  = SecurityLockAuditLib
+
+[Sources.common]
+  SecurityLockAuditLibNull.c
+
+[Packages]
+  MdePkg/MdePkg.dec
+  MdeModulePkg/MdeModulePkg.dec
+
+[LibraryClasses]
+  BaseLib
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#44090): https://edk2.groups.io/g/devel/message/44090
Mute This Topic: https://groups.io/mt/32555408/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list