]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
Update password process logic, if password without interactive attribute, the first...
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Setup.c
index 11c9589cebad2c5130d30c1b704c1ece19ccbb6f..9b6111c03bcb353160b1ae2272da4b0817f7a5e3 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Entry and initialization module for the browser.\r
 \r
-Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 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
@@ -4673,7 +4673,21 @@ PasswordCheck (
     if (PasswordString == NULL) {\r
       return EFI_SUCCESS;\r
     } \r
-    \r
+\r
+    //\r
+    // Check whether has preexisted password.\r
+    //\r
+    if (PasswordString[0] == 0) {\r
+      if (*((CHAR16 *) Question->BufferValue) == 0) {\r
+        return EFI_SUCCESS;\r
+      } else {\r
+        return EFI_NOT_READY;\r
+      }\r
+    }\r
+\r
+    //\r
+    // Check whether the input password is same as preexisted password.\r
+    //\r
     if (StrnCmp (PasswordString, (CHAR16 *) Question->BufferValue, Question->StorageWidth/sizeof (CHAR16)) == 0) {\r
       return EFI_SUCCESS;\r
     } else {\r