summaryrefslogtreecommitdiff
path: root/edk2/SecurityPkg/UserIdentification
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2012-01-27 14:40:33 +0000
committerJon Medhurst <tixy@linaro.org>2012-01-27 14:40:33 +0000
commit0e7b8cbd79e281b956a8706bfcbe08493bd8a7bd (patch)
tree6388d9d1d75eae1fae92ea18a473c9b4a4459112 /edk2/SecurityPkg/UserIdentification
parent9134f82797b14368305c9d424f42fec00376cf3a (diff)
parent7c00d189a686329426c7ed353255e13606f0c5e2 (diff)
Merge branch 'armlt-tracking' of git://git.linaro.org/arm/uefi/uefi-nextlinaro-uefi-2012.01
Diffstat (limited to 'edk2/SecurityPkg/UserIdentification')
-rw-r--r--edk2/SecurityPkg/UserIdentification/PwdCredentialProviderDxe/PwdCredentialProvider.c2
-rw-r--r--edk2/SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProvider.c6
-rw-r--r--edk2/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.c16
-rw-r--r--edk2/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerData.h1
-rw-r--r--edk2/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.c268
-rw-r--r--edk2/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManagerVfr.Vfr24
6 files changed, 202 insertions, 115 deletions
diff --git a/edk2/SecurityPkg/UserIdentification/PwdCredentialProviderDxe/PwdCredentialProvider.c b/edk2/SecurityPkg/UserIdentification/PwdCredentialProviderDxe/PwdCredentialProvider.c
index afb090a91..cf7fe4079 100644
--- a/edk2/SecurityPkg/UserIdentification/PwdCredentialProviderDxe/PwdCredentialProvider.c
+++ b/edk2/SecurityPkg/UserIdentification/PwdCredentialProviderDxe/PwdCredentialProvider.c
@@ -548,7 +548,7 @@ CredentialDriverCallback (
CHAR8 Password[CREDENTIAL_LEN];
CHAR16 *PromptStr;
- if (Action == EFI_BROWSER_ACTION_CHANGING) {
+ if (Action == EFI_BROWSER_ACTION_CHANGED) {
if (QuestionId == KEY_GET_PASSWORD) {
//
// Get and check password.
diff --git a/edk2/SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProvider.c b/edk2/SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProvider.c
index 327a2b038..f851bb2e2 100644
--- a/edk2/SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProvider.c
+++ b/edk2/SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProvider.c
@@ -1,7 +1,7 @@
/** @file
Usb Credential Provider driver implemenetation.
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2009 - 2012, 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
@@ -894,7 +894,6 @@ CredentialUser (
UINT8 *UserToken;
UINT8 ReadToken[HASHED_CREDENTIAL_LEN];
EFI_INPUT_KEY Key;
- EFI_TPL OldTpl;
CHAR16 *QuestionStr;
CHAR16 *PromptStr;
@@ -943,8 +942,6 @@ CredentialUser (
if (EFI_ERROR (Status)) {
QuestionStr = GetStringById (STRING_TOKEN (STR_READ_USB_TOKEN_ERROR));
PromptStr = GetStringById (STRING_TOKEN (STR_INSERT_USB_TOKEN));
- OldTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
- gBS->RestoreTPL (TPL_APPLICATION);
CreatePopUp (
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
&Key,
@@ -953,7 +950,6 @@ CredentialUser (
PromptStr,
NULL
);
- gBS->RaiseTPL (OldTpl);
FreePool (QuestionStr);
FreePool (PromptStr);
return EFI_NOT_FOUND;
diff --git a/edk2/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.c b/edk2/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.c
index 268dfab46..adcf9bf65 100644
--- a/edk2/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.c
+++ b/edk2/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/edk2/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerData.h b/edk2/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerData.h
index 5efc50d16..b08ac4643 100644
--- a/edk2/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerData.h
+++ b/edk2/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.
diff --git a/edk2/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.c b/edk2/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.c
index 6e5bd0650..4bba0824c 100644
--- a/edk2/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.c
+++ b/edk2/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.c
@@ -309,7 +309,7 @@ UserProfileManagerCallback (
Status = EFI_SUCCESS;
break;
- case EFI_BROWSER_ACTION_CHANGING:
+ case EFI_BROWSER_ACTION_CHANGED:
{
//
// Handle the request from form.
@@ -338,13 +338,6 @@ UserProfileManagerCallback (
//
switch (QuestionId & KEY_SECOND_FORM_MASK) {
//
- // Enter delete user profile form.
- //
- case KEY_ENTER_NEXT_FORM:
- SelectUserToDelete ();
- break;
-
- //
// Delete specified user profile.
//
case KEY_SELECT_USER:
@@ -369,13 +362,6 @@ UserProfileManagerCallback (
//
switch (QuestionId & KEY_SECOND_FORM_MASK) {
//
- // Enter modify user profile form.
- //
- case KEY_ENTER_NEXT_FORM:
- SelectUserToModify ();
- break;
-
- //
// Enter user profile information form.
//
case KEY_SELECT_USER:
@@ -384,13 +370,6 @@ UserProfileManagerCallback (
//
switch (QuestionId & KEY_MODIFY_INFO_MASK) {
//
- // Display user information form.
- //
- case KEY_ENTER_NEXT_FORM:
- ModifyUserInfo ((UINT8) QuestionId);
- break;
-
- //
// Modify user name.
//
case KEY_MODIFY_NAME:
@@ -410,13 +389,6 @@ UserProfileManagerCallback (
//
switch (QuestionId & KEY_MODIFY_IP_MASK) {
//
- // Display identity policy modify form.
- //
- case KEY_ENTER_NEXT_FORM:
- ModifyIdentityPolicy ();
- break;
-
- //
// Change credential provider option.
//
case KEY_MODIFY_PROV:
@@ -442,7 +414,7 @@ UserProfileManagerCallback (
//
case KEY_IP_RETURN_UIF:
SaveIdentityPolicy ();
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT;
break;
default:
@@ -459,13 +431,6 @@ UserProfileManagerCallback (
//
switch (QuestionId & KEY_MODIFY_AP_MASK) {
//
- // Display access policy modify form.
- //
- case KEY_ENTER_NEXT_FORM:
- ModidyAccessPolicy ();
- break;
-
- //
// Change access right choice.
//
case KEY_MODIFY_RIGHT:
@@ -487,65 +452,11 @@ UserProfileManagerCallback (
break;
//
- // Load device path form.
- //
- case KEY_MODIFY_LOAD:
- //
- // Judge next 2 bits.
- //
- switch (QuestionId & KEY_DISPLAY_DP_MASK) {
- //
- // Permit load device path.
- //
- case KEY_PERMIT_MODIFY:
- DisplayLoadPermit ();
- break;
-
- //
- // Forbid load device path.
- //
- case KEY_FORBID_MODIFY:
- DisplayLoadForbid ();
- break;
-
- default:
- break;
- }
- break;
-
- //
- // Connect device path form.
- //
- case KEY_MODIFY_CONNECT:
- //
- // Judge next 2 bits.
- //
- switch (QuestionId & KEY_DISPLAY_DP_MASK) {
- //
- // Permit connect device path.
- //
- case KEY_PERMIT_MODIFY:
- DisplayConnectPermit ();
- break;
-
- //
- // Forbid connect device path.
- //
- case KEY_FORBID_MODIFY:
- DisplayConnectForbid ();
- break;
-
- default:
- break;
- }
- break;
-
- //
// Return to user profile information form.
//
case KEY_AP_RETURN_UIF:
SaveAccessPolicy ();
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT;
break;
default:
@@ -642,6 +553,179 @@ UserProfileManagerCallback (
}
break;
+
+ case EFI_BROWSER_ACTION_CHANGING:
+ {
+ //
+ // Handle the request from form.
+ //
+ if (Value == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ //
+ // Judge first 2 bits.
+ //
+ switch (QuestionId & KEY_FIRST_FORM_MASK) {
+ //
+ // Delete user profile operation.
+ //
+ case KEY_DEL_USER:
+ //
+ // Judge next 2 bits.
+ //
+ switch (QuestionId & KEY_SECOND_FORM_MASK) {
+ //
+ // Enter delete user profile form.
+ //
+ case KEY_ENTER_NEXT_FORM:
+ SelectUserToDelete ();
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ //
+ // Modify user profile operation.
+ //
+ case KEY_MODIFY_USER:
+ //
+ // Judge next 2 bits.
+ //
+ switch (QuestionId & KEY_SECOND_FORM_MASK) {
+ //
+ // Enter modify user profile form.
+ //
+ case KEY_ENTER_NEXT_FORM:
+ SelectUserToModify ();
+ break;
+
+ //
+ // Enter user profile information form.
+ //
+ case KEY_SELECT_USER:
+ //
+ // Judge next 3 bits.
+ //
+ switch (QuestionId & KEY_MODIFY_INFO_MASK) {
+ //
+ // Display user information form.
+ //
+ case KEY_ENTER_NEXT_FORM:
+ ModifyUserInfo ((UINT8) QuestionId);
+ break;
+
+ //
+ // Modify identity policy.
+ //
+ case KEY_MODIFY_IP:
+ //
+ // Judge next 3 bits
+ //
+ switch (QuestionId & KEY_MODIFY_IP_MASK) {
+ //
+ // Display identity policy modify form.
+ //
+ case KEY_ENTER_NEXT_FORM:
+ ModifyIdentityPolicy ();
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ //
+ // Modify access policy.
+ //
+ case KEY_MODIFY_AP:
+ //
+ // Judge next 3 bits.
+ //
+ switch (QuestionId & KEY_MODIFY_AP_MASK) {
+ //
+ // Display access policy modify form.
+ //
+ case KEY_ENTER_NEXT_FORM:
+ ModidyAccessPolicy ();
+ break;
+ //
+ // Load device path form.
+ //
+ case KEY_MODIFY_LOAD:
+ //
+ // Judge next 2 bits.
+ //
+ switch (QuestionId & KEY_DISPLAY_DP_MASK) {
+ //
+ // Permit load device path.
+ //
+ case KEY_PERMIT_MODIFY:
+ DisplayLoadPermit ();
+ break;
+
+ //
+ // Forbid load device path.
+ //
+ case KEY_FORBID_MODIFY:
+ DisplayLoadForbid ();
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ //
+ // Connect device path form.
+ //
+ case KEY_MODIFY_CONNECT:
+ //
+ // Judge next 2 bits.
+ //
+ switch (QuestionId & KEY_DISPLAY_DP_MASK) {
+ //
+ // Permit connect device path.
+ //
+ case KEY_PERMIT_MODIFY:
+ DisplayConnectPermit ();
+ break;
+
+ //
+ // Forbid connect device path.
+ //
+ case KEY_FORBID_MODIFY:
+ DisplayConnectForbid ();
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ break;
+
default:
//
// All other action return unsupported.
diff --git a/edk2/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManagerVfr.Vfr b/edk2/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManagerVfr.Vfr
index d094d78a7..fa6d9e4a8 100644
--- a/edk2/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManagerVfr.Vfr
+++ b/edk2/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManagerVfr.Vfr
@@ -114,12 +114,12 @@ formset
subtitle
text = STRING_TOKEN(STR_NULL_STRING);
- goto FORMID_USER_INFO,
- prompt = STRING_TOKEN(STR_SAVE),
- help = STRING_TOKEN(STR_IDENTIFY_SAVE_HELP),
- flags = INTERACTIVE,
- key = KEY_IP_RETURN;
-
+ text
+ help = STRING_TOKEN(STR_IDENTIFY_SAVE_HELP),
+ text = STRING_TOKEN(STR_SAVE),
+ flags = INTERACTIVE,
+ key = KEY_IP_RETURN;
+
endform;
//
@@ -146,12 +146,12 @@ formset
subtitle
text = STRING_TOKEN(STR_NULL_STRING);
- goto FORMID_USER_INFO,
- prompt = STRING_TOKEN(STR_SAVE),
- help = STRING_TOKEN(STR_ACCESS_SAVE_HELP),
- flags = INTERACTIVE,
- key = KEY_AP_RETURN;
-
+ text
+ help = STRING_TOKEN(STR_ACCESS_SAVE_HELP),
+ text = STRING_TOKEN(STR_SAVE),
+ flags = INTERACTIVE,
+ key = KEY_AP_RETURN;
+
endform;
//