diff options
author | gdong1 <gdong1@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-26 02:03:57 +0000 |
---|---|---|
committer | gdong1 <gdong1@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-26 02:03:57 +0000 |
commit | 0c5b25f021a815d4ddce306139cc077db9afddfd (patch) | |
tree | 474e6918d9f4dc467f98a8f2e2a6a040f344efe3 /SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileDelete.c | |
parent | 5f4ef94a55807e1b42201866af232053183d3f8d (diff) | |
download | edk2-platforms-0c5b25f021a815d4ddce306139cc077db9afddfd.tar.xz |
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
Diffstat (limited to 'SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileDelete.c')
-rw-r--r-- | SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileDelete.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileDelete.c b/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileDelete.c index fffc93beab..3fe403106b 100644 --- a/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileDelete.c +++ b/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileDelete.c @@ -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;
|