From fab1046560e520486f255093cbb4fe36a347f93a Mon Sep 17 00:00:00 2001 From: ydong10 Date: Thu, 15 Dec 2011 02:59:03 +0000 Subject: Update for SecurityPkg. Per UEFI spec, on CallBack action EFI_BROWSER_ACTION_CHANGING, the return value of ActionRequest will be ignored, but on CallBack action EFI_BROWSER_ACTION_CHANGED, the return value of ActionRequest will be used. But, EDKII browser still processes the got ActionRequest. And, all HII drivers in EDKII project also returns their expected ActionRequest value on action EFI_BROWSER_ACTION_CHANGING. Now update the browser to follow the spec, and update all core Hii drivers to keep old working modal. Signed-off-by: ydong10 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12868 6f19259b-4bc3-4df7-8a09-765794883524 --- .../UserIdentifyManagerDxe/UserIdentifyManager.c | 16 +++++++++++----- .../UserIdentifyManagerDxe/UserIdentifyManagerData.h | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'SecurityPkg/UserIdentification/UserIdentifyManagerDxe') diff --git a/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.c b/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.c index 268dfab469..adcf9bf652 100644 --- a/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.c +++ b/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.c @@ -2411,8 +2411,7 @@ UserIdentifyManagerCallback ( Status = EFI_SUCCESS; break; - case EFI_BROWSER_ACTION_CHANGING: - { + case EFI_BROWSER_ACTION_CHANGED: if (QuestionId >= LABEL_PROVIDER_NAME) { // // QuestionId comes from the second Form (Select a Credential Provider if identity @@ -2425,10 +2424,16 @@ UserIdentifyManagerCallback ( } return EFI_SUCCESS; } - + break; + + case EFI_BROWSER_ACTION_CHANGING: // // QuestionId comes from the first Form (Select a user to identify). // + if (QuestionId >= LABEL_PROVIDER_NAME) { + return EFI_SUCCESS; + } + User = (USER_PROFILE_ENTRY *) mUserProfileDb->UserProfile[QuestionId & 0xFFF]; Status = GetIdentifyType (User, &PolicyType); if (EFI_ERROR (Status)) { @@ -2456,9 +2461,10 @@ UserIdentifyManagerCallback ( mCurrentUser = (EFI_USER_PROFILE_HANDLE) User; mIdentified = TRUE; - *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT; + if (Type == EFI_IFR_TYPE_REF) { + Value->ref.FormId = FORMID_INVALID_FORM; + } } - } break; default: diff --git a/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerData.h b/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerData.h index 5efc50d16b..b08ac46437 100644 --- a/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerData.h +++ b/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerData.h @@ -22,6 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // #define FORMID_USER_FORM 1 #define FORMID_PROVIDER_FORM 2 +#define FORMID_INVALID_FORM 0x0FFF // // Labels definition. -- cgit v1.2.3