diff options
author | gdong1 <gdong1@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-01 06:13:04 +0000 |
---|---|---|
committer | gdong1 <gdong1@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-01 06:13:04 +0000 |
commit | 337661bb8c981400d3a0c93d0d49a65f2e4eed8c (patch) | |
tree | f0006c23d91b321610094e45c22cae0f3e72ce0c /IntelFrameworkModulePkg/Library | |
parent | 7d6cdbc8dd3efda6ccdbc919a51b5c0adff4beaa (diff) | |
download | edk2-platforms-337661bb8c981400d3a0c93d0d49a65f2e4eed8c.tar.xz |
Add BdsLibUserIdentify API in GenericBdsLib
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9897 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Library')
-rw-r--r-- | IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c | 31 | ||||
-rw-r--r-- | IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf | 1 |
2 files changed, 32 insertions, 0 deletions
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c index 66b9d2bb2d..6636b73f74 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c @@ -1235,3 +1235,34 @@ BdsLibSaveMemoryTypeInformation ( }
+/**
+ Identify a user and, if authenticated, returns the current user profile handle.
+
+ @param[out] User Point to user profile handle.
+
+ @retval EFI_SUCCESS User is successfully identified, or user identification
+ is not supported.
+ @retval EFI_ACCESS_DENIED User is not successfully identified
+
+**/
+EFI_STATUS
+EFIAPI
+BdsLibUserIdentify (
+ OUT EFI_USER_PROFILE_HANDLE *User
+ )
+{
+ EFI_STATUS Status;
+ EFI_USER_MANAGER_PROTOCOL *Manager;
+
+ Status = gBS->LocateProtocol (
+ &gEfiUserManagerProtocolGuid,
+ NULL,
+ (VOID **) &Manager
+ );
+ if (EFI_ERROR (Status)) {
+ return EFI_SUCCESS;
+ }
+
+ return Manager->Identify (Manager, User);
+}
+
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf b/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf index 3b81f80b76..dcb0295a43 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf @@ -113,6 +113,7 @@ gEfiUgaDrawProtocolGuid |PcdUgaConsumeSupport # PROTOCOL SOMETIMES_CONSUMES
gEfiOEMBadgingProtocolGuid # PROTOCOL CONSUMES
gEfiHiiFontProtocolGuid # PROTOCOL CONSUMES
+ gEfiUserManagerProtocolGuid # PROTOCOL CONSUMES
[FeaturePcd]
gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport
|