Update UID drivers to align with latest UEFI spec 2.3.1 errata A.
Signed-off-by: gdong1 Reviewed-by: xdu2 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12345 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -1061,17 +1061,8 @@ CredentialUser (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// The User's password doesn't match the input password.
|
|
||||||
// Return the user ID whose password matches the input password.
|
|
||||||
//
|
|
||||||
CopyMem (
|
|
||||||
Identifier,
|
|
||||||
&mPwdTable->UserInfo[mPwdTable->ValidIndex - 1].UserId,
|
|
||||||
sizeof (EFI_USER_INFO_IDENTIFIER)
|
|
||||||
);
|
|
||||||
FreePool (UserInfo);
|
FreePool (UserInfo);
|
||||||
return EFI_SUCCESS;
|
return EFI_NOT_READY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Usb Credential Provider driver implemenetation.
|
Usb Credential Provider driver implemenetation.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -1037,25 +1037,10 @@ CredentialUser (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FreePool (UserInfo);
|
|
||||||
|
FreePool (UserInfo);
|
||||||
//
|
|
||||||
// The read token mismatch with the User's Token.
|
return EFI_NOT_READY;
|
||||||
// Only check token.
|
|
||||||
//
|
|
||||||
for (Index = 0; Index < mUsbTable->Count; Index++) {
|
|
||||||
UserToken = mUsbTable->UserInfo[Index].Token;
|
|
||||||
if (CompareMem (UserToken, ReadToken, HASHED_CREDENTIAL_LEN) == 0) {
|
|
||||||
//
|
|
||||||
// The read token matches with the one in UsbTable.
|
|
||||||
//
|
|
||||||
UserId = (UINT8 *) &mUsbTable->UserInfo[Index].UserId;
|
|
||||||
CopyMem (Identifier, UserId, sizeof (EFI_USER_INFO_IDENTIFIER));
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return EFI_NOT_FOUND;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2319,7 +2319,7 @@ GetIdentifyType (
|
|||||||
Identify the User by the specfied provider.
|
Identify the User by the specfied provider.
|
||||||
|
|
||||||
@param[in] User Handle of a user profile.
|
@param[in] User Handle of a user profile.
|
||||||
@param[in] Provider Points to the identifir of credential provider.
|
@param[in] Provider Points to the identifier of credential provider.
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Provider is NULL.
|
@retval EFI_INVALID_PARAMETER Provider is NULL.
|
||||||
@retval EFI_NOT_FOUND Fail to identify the specified user.
|
@retval EFI_NOT_FOUND Fail to identify the specified user.
|
||||||
@ -2340,7 +2340,6 @@ IdentifyByProviderId (
|
|||||||
EFI_GUID FormSetId;
|
EFI_GUID FormSetId;
|
||||||
EFI_FORM_ID FormId;
|
EFI_FORM_ID FormId;
|
||||||
EFI_USER_CREDENTIAL_PROTOCOL *UserCredential;
|
EFI_USER_CREDENTIAL_PROTOCOL *UserCredential;
|
||||||
EFI_USER_INFO *IdInfo;
|
|
||||||
|
|
||||||
if (Provider == NULL) {
|
if (Provider == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
@ -2398,24 +2397,7 @@ IdentifyByProviderId (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (User == NULL) {
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Get user ID information.
|
|
||||||
//
|
|
||||||
IdInfo = NULL;
|
|
||||||
Status = FindUserInfoByType (User, &IdInfo, EFI_USER_INFO_IDENTIFIER_RECORD);
|
|
||||||
ASSERT (IdInfo != NULL);
|
|
||||||
|
|
||||||
if (CompareMem ((UINT8 *) (IdInfo + 1), UserId, sizeof (EFI_USER_INFO_IDENTIFIER)) != 0) {
|
|
||||||
//
|
|
||||||
// One user name is selected, but the other's credential is given. Here no user passed.
|
|
||||||
//
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user