diff options
author | Eric Dong <eric.dong@intel.com> | 2014-01-23 02:00:15 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-01-23 02:00:15 +0000 |
commit | 27582c41bacab463c9ca8db219c257dcd6081b32 (patch) | |
tree | c8d32422ae0c5a1ae2430cc4b5bdbf71f29880f0 /MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | |
parent | 96179cb36e78bd21e64e7b00c0dc914cb9844850 (diff) | |
download | edk2-platforms-27582c41bacab463c9ca8db219c257dcd6081b32.tar.xz |
Update password process logic, if password without interactive attribute, the first byte of buffer is zero means this password not has preexist value.
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
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Setup.c')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index 11c9589ceb..9b6111c03b 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -1,7 +1,7 @@ /** @file
Entry and initialization module for the browser.
-Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -4673,7 +4673,21 @@ PasswordCheck ( if (PasswordString == NULL) {
return EFI_SUCCESS;
}
-
+
+ //
+ // Check whether has preexisted password.
+ //
+ if (PasswordString[0] == 0) {
+ if (*((CHAR16 *) Question->BufferValue) == 0) {
+ return EFI_SUCCESS;
+ } else {
+ return EFI_NOT_READY;
+ }
+ }
+
+ //
+ // Check whether the input password is same as preexisted password.
+ //
if (StrnCmp (PasswordString, (CHAR16 *) Question->BufferValue, Question->StorageWidth/sizeof (CHAR16)) == 0) {
return EFI_SUCCESS;
} else {
|