]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update password process logic, if password without interactive attribute, the first...
authorEric Dong <eric.dong@intel.com>
Thu, 23 Jan 2014 02:00:15 +0000 (02:00 +0000)
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 23 Jan 2014 02:00:15 +0000 (02:00 +0000)
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15170 6f19259b-4bc3-4df7-8a09-765794883524

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