]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.c
Force UID modules build error to warn user that currently it is just a sample.
[mirror_edk2.git] / SecurityPkg / UserIdentification / UserIdentifyManagerDxe / UserIdentifyManager.c
index 268dfab469992b0470d86e8a49ed0b2177e9b42b..a7467b366290e4bcc8a962292646a4c5c7d94cf2 100644 (file)
@@ -1,7 +1,7 @@
 /** @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
 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 +2411,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 +2424,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 +2461,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
@@ -3729,6 +3735,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