]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.c
SecurityPkg/UserIdentifyManagerDxe: Update RouteConfig function
[mirror_edk2.git] / SecurityPkg / UserIdentification / UserIdentifyManagerDxe / UserIdentifyManager.c
index 268dfab469992b0470d86e8a49ed0b2177e9b42b..f9743db84d88a18c8d40a32b4a4c169918f0053c 100644 (file)
@@ -1,7 +1,8 @@
 /** @file\r
   This driver manages user information and produces user manager protocol.\r
   \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+(C) Copyright 2018 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials \r
 are licensed and made available under the terms and conditions of the BSD License \r
 which accompanies this distribution.  The full text of the license may be found at \r
@@ -2411,8 +2412,7 @@ UserIdentifyManagerCallback (
     Status = EFI_SUCCESS;\r
     break;\r
 \r
-  case EFI_BROWSER_ACTION_CHANGING:\r
-  {\r
+  case EFI_BROWSER_ACTION_CHANGED:\r
     if (QuestionId >= LABEL_PROVIDER_NAME) {\r
       //\r
       // QuestionId comes from the second Form (Select a Credential Provider if identity  \r
@@ -2425,10 +2425,16 @@ UserIdentifyManagerCallback (
       }\r
       return EFI_SUCCESS;\r
     }\r
-\r
+    break;\r
+    \r
+  case EFI_BROWSER_ACTION_CHANGING:\r
     //\r
     // QuestionId comes from the first Form (Select a user to identify).\r
     //\r
+    if (QuestionId >= LABEL_PROVIDER_NAME) {\r
+      return EFI_SUCCESS;\r
+    }\r
+\r
     User   = (USER_PROFILE_ENTRY *) mUserProfileDb->UserProfile[QuestionId & 0xFFF];\r
     Status = GetIdentifyType (User, &PolicyType);\r
     if (EFI_ERROR (Status)) {\r
@@ -2456,9 +2462,10 @@ UserIdentifyManagerCallback (
 \r
       mCurrentUser    = (EFI_USER_PROFILE_HANDLE) User;\r
       mIdentified     = TRUE;\r
-      *ActionRequest  = EFI_BROWSER_ACTION_REQUEST_EXIT;\r
+      if (Type == EFI_IFR_TYPE_REF) {\r
+        Value->ref.FormId = FORMID_INVALID_FORM;\r
+      }\r
     }\r
-  }\r
   break;\r
 \r
   default:\r
@@ -2746,6 +2753,8 @@ FakeRouteConfig (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
+  *Progress = Configuration;\r
+\r
   return EFI_NOT_FOUND;\r
 }\r
 \r
@@ -3729,6 +3738,11 @@ UserIdentifyManagerInit (
 \r
   EFI_STATUS  Status;\r
 \r
+  //\r
+  // It is NOT robust enough to be included in production.\r
+  //\r
+  #error "This implementation is just a sample, please comment this line if you really want to use this driver."\r
+\r
   //\r
   // Initiate form browser.\r
   //\r