Update UID drivers to align with latest UEFI spec 2.3.1.

Signed-off-by: gdong1
Reviewed-by: tye
Reviewed-by: qianouyang

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12567 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
gdong1
2011-10-26 02:03:57 +00:00
parent 5f4ef94a55
commit 0c5b25f021
10 changed files with 1333 additions and 1699 deletions

View File

@@ -185,6 +185,9 @@ DeleteUser (
EFI_STATUS Status;
EFI_USER_PROFILE_HANDLE User;
EFI_INPUT_KEY Key;
EFI_USER_INFO_HANDLE UserInfo;
EFI_USER_INFO *Info;
UINTN InfoSize;
//
// Find specified user profile and delete it.
@@ -204,6 +207,31 @@ DeleteUser (
}
if (UserIndex == 1) {
//
// Get the identification policy.
//
Status = FindInfoByType (User, EFI_USER_INFO_IDENTITY_POLICY_RECORD, &UserInfo);
if (EFI_ERROR (Status)) {
goto Done;
}
InfoSize = 0;
Info = NULL;
Status = mUserManager->GetInfo (mUserManager, User, UserInfo, Info, &InfoSize);
if (Status == EFI_BUFFER_TOO_SMALL) {
Info = AllocateZeroPool (InfoSize);
if (Info == NULL) {
goto Done;
}
Status = mUserManager->GetInfo (mUserManager, User, UserInfo, Info, &InfoSize);
}
//
// Delete the user on the credential providers by its identification policy.
//
DeleteCredentialFromProviders ((UINT8 *)(Info + 1), Info->InfoSize - sizeof (EFI_USER_INFO), User);
FreePool (Info);
Status = mUserManager->Delete (mUserManager, User);
if (EFI_ERROR (Status)) {
goto Done;