]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProvider.c
Force UID modules build error to warn user that currently it is just a sample.
[mirror_edk2.git] / SecurityPkg / UserIdentification / UsbCredentialProviderDxe / UsbCredentialProvider.c
index 979cdfd2cb22af85af938824e5c03118f79991a5..046a50052d78df90aca61b48bd14b96141bbd6dc 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Usb Credential Provider driver implemenetation.\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
@@ -674,7 +674,6 @@ CredentialEnroll (
   USB_INFO                  UsbInfo;\r
   EFI_USER_INFO             *UserInfo;\r
   EFI_INPUT_KEY             Key;\r
-  EFI_USER_MANAGER_PROTOCOL *UserManager;\r
   UINT8                     *UserId;\r
   CHAR16                    *QuestionStr;\r
   CHAR16                    *PromptStr;\r
@@ -683,15 +682,6 @@ CredentialEnroll (
     return EFI_INVALID_PARAMETER;\r
   }\r
  \r
-  Status = gBS->LocateProtocol (\r
-                  &gEfiUserManagerProtocolGuid,\r
-                  NULL,\r
-                  (VOID **) &UserManager\r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-\r
   //\r
   // Get User Identifier\r
   //\r
@@ -749,11 +739,6 @@ CredentialEnroll (
     return Status;\r
   }\r
 \r
-  //\r
-  // Notify the user manager driver that credential information has changed.\r
-  //\r
-  UserManager->Notify (UserManager, mCallbackInfo->DriverHandle);  \r
-\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -909,7 +894,6 @@ CredentialUser (
   UINT8         *UserToken; \r
   UINT8         ReadToken[HASHED_CREDENTIAL_LEN];\r
   EFI_INPUT_KEY Key;\r
-  EFI_TPL       OldTpl;\r
   CHAR16        *QuestionStr;\r
   CHAR16        *PromptStr;\r
   \r
@@ -958,8 +942,6 @@ CredentialUser (
   if (EFI_ERROR (Status)) {\r
     QuestionStr = GetStringById (STRING_TOKEN (STR_READ_USB_TOKEN_ERROR));\r
     PromptStr   = GetStringById (STRING_TOKEN (STR_INSERT_USB_TOKEN));\r
-    OldTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);\r
-    gBS->RestoreTPL (TPL_APPLICATION);\r
     CreatePopUp (\r
       EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,\r
       &Key,\r
@@ -968,7 +950,6 @@ CredentialUser (
       PromptStr,\r
       NULL\r
       );\r
-    gBS->RaiseTPL (OldTpl);\r
     FreePool (QuestionStr);\r
     FreePool (PromptStr);\r
     return EFI_NOT_FOUND;\r
@@ -1395,6 +1376,11 @@ UsbProviderInit (
 {\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
   // Init credential table.\r
   //\r