SecurityPkg: Clean up source files

1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Liming Gao
2018-06-27 21:13:09 +08:00
parent 5a702acd3d
commit b3548d32dd
224 changed files with 3246 additions and 3246 deletions

View File

@@ -1,13 +1,13 @@
/** @file
The functions for access policy modification.
Copyright (c) 2009 - 2013, 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
Copyright (c) 2009 - 2018, 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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "UserProfileManager.h"
/**
Collect all the access policy data to mUserInfo.AccessPolicy,
Collect all the access policy data to mUserInfo.AccessPolicy,
and save it to user profile.
**/
@@ -38,7 +38,7 @@ SaveAccessPolicy (
mUserInfo.AccessPolicyLen = 0;
mUserInfo.AccessPolicyModified = TRUE;
OffSet = 0;
//
// Save access right.
//
@@ -51,7 +51,7 @@ SaveAccessPolicy (
Control.Size = (UINT32) Size;
CopyMem (mUserInfo.AccessPolicy + OffSet, &Control, sizeof (Control));
OffSet += sizeof (Control);
//
// Save access setup.
//
@@ -61,10 +61,10 @@ SaveAccessPolicy (
}
Control.Type = EFI_USER_INFO_ACCESS_SETUP;
Control.Size = (UINT32) Size;
Control.Size = (UINT32) Size;
CopyMem (mUserInfo.AccessPolicy + OffSet, &Control, sizeof (Control));
OffSet += sizeof (Control);
if (mAccessInfo.AccessSetup == ACCESS_SETUP_NORMAL) {
CopyGuid ((EFI_GUID *) (mUserInfo.AccessPolicy + OffSet), &gEfiUserInfoAccessSetupNormalGuid);
} else if (mAccessInfo.AccessSetup == ACCESS_SETUP_RESTRICTED) {
@@ -73,7 +73,7 @@ SaveAccessPolicy (
CopyGuid ((EFI_GUID *) (mUserInfo.AccessPolicy + OffSet), &gEfiUserInfoAccessSetupAdminGuid);
}
OffSet += sizeof (EFI_GUID);
//
// Save access of boot order.
//
@@ -83,13 +83,13 @@ SaveAccessPolicy (
}
Control.Type = EFI_USER_INFO_ACCESS_BOOT_ORDER;
Control.Size = (UINT32) Size;
Control.Size = (UINT32) Size;
CopyMem (mUserInfo.AccessPolicy + OffSet, &Control, sizeof (Control));
OffSet += sizeof (Control);
CopyMem ((UINT8 *) (mUserInfo.AccessPolicy + OffSet), &mAccessInfo.AccessBootOrder, sizeof (UINT32));
OffSet += sizeof (UINT32);
//
// Save permit load.
//
@@ -100,14 +100,14 @@ SaveAccessPolicy (
}
Control.Type = EFI_USER_INFO_ACCESS_PERMIT_LOAD;
Control.Size = (UINT32) Size;
Control.Size = (UINT32) Size;
CopyMem (mUserInfo.AccessPolicy + OffSet, &Control, sizeof (Control));
OffSet += sizeof (Control);
CopyMem (mUserInfo.AccessPolicy + OffSet, mAccessInfo.LoadPermit, mAccessInfo.LoadPermitLen);
OffSet += mAccessInfo.LoadPermitLen;
}
//
// Save forbid load.
//
@@ -118,14 +118,14 @@ SaveAccessPolicy (
}
Control.Type = EFI_USER_INFO_ACCESS_FORBID_LOAD;
Control.Size = (UINT32) Size;
Control.Size = (UINT32) Size;
CopyMem (mUserInfo.AccessPolicy + OffSet, &Control, sizeof (Control));
OffSet += sizeof (Control);
CopyMem (mUserInfo.AccessPolicy + OffSet, mAccessInfo.LoadForbid, mAccessInfo.LoadForbidLen);
OffSet += mAccessInfo.LoadForbidLen;
}
//
// Save permit connect.
//
@@ -136,14 +136,14 @@ SaveAccessPolicy (
}
Control.Type = EFI_USER_INFO_ACCESS_PERMIT_CONNECT;
Control.Size = (UINT32) Size;
Control.Size = (UINT32) Size;
CopyMem (mUserInfo.AccessPolicy + OffSet, &Control, sizeof (Control));
OffSet += sizeof (Control);
CopyMem (mUserInfo.AccessPolicy + OffSet, mAccessInfo.ConnectPermit, mAccessInfo.ConnectPermitLen);
OffSet += mAccessInfo.ConnectPermitLen;
}
//
// Save forbid connect.
//
@@ -154,10 +154,10 @@ SaveAccessPolicy (
}
Control.Type = EFI_USER_INFO_ACCESS_FORBID_CONNECT;
Control.Size = (UINT32) Size;
Control.Size = (UINT32) Size;
CopyMem (mUserInfo.AccessPolicy + OffSet, &Control, sizeof (Control));
OffSet += sizeof (Control);
CopyMem (mUserInfo.AccessPolicy + OffSet, mAccessInfo.ConnectForbid, mAccessInfo.ConnectForbidLen);
OffSet += mAccessInfo.ConnectForbidLen;
}
@@ -264,11 +264,11 @@ AddDevicePath (
/**
Check whether the DevicePath is in the device path forbid list
Check whether the DevicePath is in the device path forbid list
(mAccessInfo.LoadForbid).
@param[in] DevicePath Points to device path.
@retval TRUE The DevicePath is in the device path forbid list.
@retval FALSE The DevicePath is not in the device path forbid list.
@@ -330,10 +330,10 @@ DisplayLoadPermit(
//
OrderSize = 0;
Status = gRT->GetVariable (
L"DriverOrder",
&gEfiGlobalVariableGuid,
NULL,
&OrderSize,
L"DriverOrder",
&gEfiGlobalVariableGuid,
NULL,
&OrderSize,
NULL
);
if (Status != EFI_BUFFER_TOO_SMALL) {
@@ -346,16 +346,16 @@ DisplayLoadPermit(
}
Status = gRT->GetVariable (
L"DriverOrder",
&gEfiGlobalVariableGuid,
NULL,
&OrderSize,
L"DriverOrder",
&gEfiGlobalVariableGuid,
NULL,
&OrderSize,
Order
);
if (EFI_ERROR (Status)) {
return ;
}
//
// Initialize the container for dynamic opcodes.
//
@@ -400,11 +400,11 @@ DisplayLoadPermit(
if (Var == NULL) {
continue;
}
//
// Check whether the driver is already forbidden.
//
VarPtr = Var;
//
// Skip attribute.
@@ -545,7 +545,7 @@ DisplayConnectPermit (
)
{
//
// Note:
// Note:
// As no architect protocol/interface to be called in ConnectController()
// to verify the device path, just add a place holder for permitted connect
// device path.
@@ -563,7 +563,7 @@ DisplayConnectForbid (
)
{
//
// Note:
// Note:
// As no architect protocol/interface to be called in ConnectController()
// to verify the device path, just add a place holder for forbidden connect
// device path.
@@ -572,11 +572,11 @@ DisplayConnectForbid (
/**
Delete the specified device path by DriverIndex from the forbid device path
Delete the specified device path by DriverIndex from the forbid device path
list (mAccessInfo.LoadForbid).
@param[in] DriverIndex The index of driver in forbidden device path list.
**/
VOID
DeleteFromForbidLoad (
@@ -598,7 +598,7 @@ DeleteFromForbidLoad (
OffSet += DPSize;
DriverIndex--;
}
//
// Specified device path found.
//
@@ -608,8 +608,8 @@ DeleteFromForbidLoad (
OffLen = mAccessInfo.LoadForbidLen - OffSet - DPSize;
if (OffLen > 0) {
CopyMem (
mAccessInfo.LoadForbid + OffSet,
mAccessInfo.LoadForbid + OffSet + DPSize,
mAccessInfo.LoadForbid + OffSet,
mAccessInfo.LoadForbid + OffSet + DPSize,
OffLen
);
}
@@ -619,11 +619,11 @@ DeleteFromForbidLoad (
/**
Add the specified device path by DriverIndex to the forbid device path
Add the specified device path by DriverIndex to the forbid device path
list (mAccessInfo.LoadForbid).
@param[in] DriverIndex The index of driver saved in driver options.
**/
VOID
AddToForbidLoad (
@@ -645,11 +645,11 @@ AddToForbidLoad (
if (Var == NULL) {
return;
}
//
// Save forbid load driver.
//
VarPtr = Var;
//
// Skip attribute.

View File

@@ -1,13 +1,13 @@
/** @file
The functions for identification policy modification.
Copyright (c) 2009 - 2011, 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
Copyright (c) 2009 - 2018, 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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
provider can't appear twice in one identity policy.
@param[in] NewGuid Points to the credential provider guid.
@retval TRUE The NewGuid was found in the identity policy.
@retval FALSE The NewGuid was not found.
@@ -52,7 +52,7 @@ ProviderAlreadyInPolicy (
}
Offset += Identity->Length;
}
return FALSE;
}
@@ -70,12 +70,12 @@ ProviderAlreadyInPolicy (
EFI_STATUS
EnrollUserOnProvider (
IN EFI_USER_INFO_IDENTITY_POLICY *Identity,
IN EFI_USER_PROFILE_HANDLE User
IN EFI_USER_PROFILE_HANDLE User
)
{
UINTN Index;
EFI_USER_CREDENTIAL2_PROTOCOL *UserCredential;
//
// Find the specified credential provider.
//
@@ -86,7 +86,7 @@ EnrollUserOnProvider (
}
}
return EFI_NOT_FOUND;
return EFI_NOT_FOUND;
}
@@ -103,12 +103,12 @@ EnrollUserOnProvider (
EFI_STATUS
DeleteUserOnProvider (
IN EFI_USER_INFO_IDENTITY_POLICY *Identity,
IN EFI_USER_PROFILE_HANDLE User
IN EFI_USER_PROFILE_HANDLE User
)
{
UINTN Index;
EFI_USER_CREDENTIAL2_PROTOCOL *UserCredential;
//
// Find the specified credential provider.
//
@@ -119,13 +119,13 @@ DeleteUserOnProvider (
}
}
return EFI_NOT_FOUND;
return EFI_NOT_FOUND;
}
/**
Delete User's credental from all the providers that exist in User's identity policy.
@param[in] IdentityPolicy Point to User's identity policy.
@param[in] IdentityPolicyLen The length of the identity policy.
@param[in] User Points to user profile.
@@ -135,7 +135,7 @@ VOID
DeleteCredentialFromProviders (
IN UINT8 *IdentityPolicy,
IN UINTN IdentityPolicyLen,
IN EFI_USER_PROFILE_HANDLE User
IN EFI_USER_PROFILE_HANDLE User
)
{
EFI_USER_INFO_IDENTITY_POLICY *Identity;
@@ -158,7 +158,7 @@ DeleteCredentialFromProviders (
/**
Remove the provider specified by Offset from the new user identification record.
@param[in] IdentityPolicy Point to user identity item in new identification policy.
@param[in] Offset The item offset in the new identification policy.
@@ -187,11 +187,11 @@ DeleteProviderFromPolicy (
if ((Offset + IdentityPolicy->Length) != mUserInfo.NewIdentityPolicyLen) {
//
// This provider is not the last item in the identification policy, delete it and the connector.
//
//
RemainingLen = mUserInfo.NewIdentityPolicyLen - Offset - DeleteLen;
CopyMem ((UINT8 *) IdentityPolicy, (UINT8 *) IdentityPolicy + DeleteLen, RemainingLen);
}
mUserInfo.NewIdentityPolicyLen -= DeleteLen;
mUserInfo.NewIdentityPolicyLen -= DeleteLen;
}
@@ -201,7 +201,7 @@ DeleteProviderFromPolicy (
It is invoked when 'add option' in UI is pressed.
@param[in] NewGuid Points to the credential provider guid.
**/
VOID
AddProviderToPolicy (
@@ -248,7 +248,7 @@ AddProviderToPolicy (
NewPolicyInfoLen = mUserInfo.NewIdentityPolicyLen + Policy->Length;
FreePool (mUserInfo.NewIdentityPolicy);
}
//
// Save credential provider.
//
@@ -325,7 +325,7 @@ UpdateCredentialProvider (
@retval TRUE The policy is a valid identity policy.
@retval FALSE The policy is not a valid identity policy.
**/
BOOLEAN
CheckNewIdentityPolicy (
@@ -337,7 +337,7 @@ CheckNewIdentityPolicy (
EFI_INPUT_KEY Key;
UINTN Offset;
UINT32 OpCode;
//
// Check policy expression.
//
@@ -349,7 +349,7 @@ CheckNewIdentityPolicy (
//
Identity = (EFI_USER_INFO_IDENTITY_POLICY *) (PolicyInfo + Offset);
switch (Identity->Type) {
case EFI_USER_INFO_IDENTITY_TRUE:
break;
@@ -408,11 +408,11 @@ CheckNewIdentityPolicy (
/**
Save the identity policy and update UI with it.
This function will verify the new identity policy, in current implementation,
This function will verify the new identity policy, in current implementation,
the identity policy can be: T, P & P & P & ..., P | P | P | ...
Here, "T" means "True", "P" means "Credential Provider", "&" means "and", "|" means "or".
Other identity policies are not supported.
Other identity policies are not supported.
**/
VOID
@@ -439,7 +439,7 @@ SaveIdentityPolicy (
if (EFI_ERROR (Status)) {
return ;
}
//
// Update the informantion on credential provider.
//
@@ -447,7 +447,7 @@ SaveIdentityPolicy (
if (EFI_ERROR (Status)) {
return ;
}
//
// Save new identification policy.
//
@@ -461,7 +461,7 @@ SaveIdentityPolicy (
Status = mUserManager->SetInfo (mUserManager, mModifyUser, &UserInfo, Info, Info->InfoSize);
FreePool (Info);
//
// Update the mUserInfo.IdentityPolicy by mUserInfo.NewIdentityPolicy
//
@@ -473,7 +473,7 @@ SaveIdentityPolicy (
mUserInfo.NewIdentityPolicy = NULL;
mUserInfo.NewIdentityPolicyLen = 0;
mUserInfo.NewIdentityPolicyModified = FALSE;
mUserInfo.NewIdentityPolicyModified = FALSE;
//
// Update identity policy choice.
@@ -494,7 +494,7 @@ AddIdentityPolicyItem (
if (mProviderInfo->Count == 0) {
return ;
}
//
// Check the identity policy.
//

View File

@@ -1,13 +1,13 @@
/** @file
The functions to add a user profile.
Copyright (c) 2009 - 2011, 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
Copyright (c) 2009 - 2018, 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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -17,11 +17,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
Get user name from the popup windows.
@param[in, out] UserNameLen On entry, point to UserName buffer lengh, in bytes.
On exit, point to input user name length, in bytes.
@param[out] UserName The buffer to hold the input user name.
@retval EFI_ABORTED It is given up by pressing 'ESC' key.
@retval EFI_NOT_READY Not a valid input at all.
@retval EFI_SUCCESS Get a user name successfully.
@@ -100,7 +100,7 @@ GetUserNameInput (
*UserNameLen = NameLen * sizeof (CHAR16);
CopyMem (UserName, Name, *UserNameLen);
return EFI_SUCCESS;
}
@@ -112,7 +112,7 @@ GetUserNameInput (
@param[in] UserName Point to the buffer of user name.
@retval EFI_NOT_READY The usernme in mAddUserName had been used.
@retval EFI_SUCCESS Change the user's username successfully with
@retval EFI_SUCCESS Change the user's username successfully with
username in mAddUserName.
**/
@@ -127,13 +127,13 @@ SetUserName (
EFI_USER_INFO_HANDLE UserInfo;
EFI_USER_PROFILE_HANDLE TempUser;
EFI_USER_INFO *NewUserInfo;
NewUserInfo = AllocateZeroPool (sizeof (EFI_USER_INFO) + UserNameLen);
ASSERT (NewUserInfo != NULL);
NewUserInfo->InfoType = EFI_USER_INFO_NAME_RECORD;
NewUserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV |
EFI_USER_INFO_PUBLIC |
NewUserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV |
EFI_USER_INFO_PUBLIC |
EFI_USER_INFO_EXCLUSIVE;
NewUserInfo->InfoSize = (UINT32) (sizeof (EFI_USER_INFO) + UserNameLen);
CopyMem ((UINT8 *) (NewUserInfo + 1), UserName, UserNameLen);
@@ -181,7 +181,7 @@ SetCreateDate (
EFI_USER_INFO_HANDLE UserInfo;
EFI_USER_INFO_CREATE_DATE Date;
EFI_USER_INFO *NewUserInfo;
NewUserInfo = AllocateZeroPool (
sizeof (EFI_USER_INFO) +
sizeof (EFI_USER_INFO_CREATE_DATE)
@@ -189,8 +189,8 @@ SetCreateDate (
ASSERT (NewUserInfo != NULL);
NewUserInfo->InfoType = EFI_USER_INFO_CREATE_DATE_RECORD;
NewUserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV |
EFI_USER_INFO_PUBLIC |
NewUserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV |
EFI_USER_INFO_PUBLIC |
EFI_USER_INFO_EXCLUSIVE;
NewUserInfo->InfoSize = sizeof (EFI_USER_INFO) + sizeof (EFI_USER_INFO_CREATE_DATE);
Status = gRT->GetTime (&Date, NULL);
@@ -215,7 +215,7 @@ SetCreateDate (
/**
Set the default identity policy of the specified user.
@param[in] User Handle of a user profile.
@param[in] User Handle of a user profile.
**/
VOID
@@ -226,20 +226,20 @@ SetIdentityPolicy (
EFI_USER_INFO_IDENTITY_POLICY *Policy;
EFI_USER_INFO_HANDLE UserInfo;
EFI_USER_INFO *NewUserInfo;
NewUserInfo = AllocateZeroPool (
sizeof (EFI_USER_INFO) +
sizeof (EFI_USER_INFO) +
sizeof (EFI_USER_INFO_IDENTITY_POLICY)
);
ASSERT (NewUserInfo != NULL);
Policy = (EFI_USER_INFO_IDENTITY_POLICY *) (NewUserInfo + 1);
Policy->Type = EFI_USER_INFO_IDENTITY_TRUE;
Policy->Length = sizeof (EFI_USER_INFO_IDENTITY_POLICY);
NewUserInfo->InfoType = EFI_USER_INFO_IDENTITY_POLICY_RECORD;
NewUserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV |
EFI_USER_INFO_PUBLIC |
NewUserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV |
EFI_USER_INFO_PUBLIC |
EFI_USER_INFO_EXCLUSIVE;
NewUserInfo->InfoSize = sizeof (EFI_USER_INFO) + Policy->Length;
UserInfo = NULL;
@@ -257,7 +257,7 @@ SetIdentityPolicy (
/**
Set the default access policy of the specified user.
@param[in] User Handle of a user profile.
@param[in] User Handle of a user profile.
**/
VOID
@@ -268,20 +268,20 @@ SetAccessPolicy (
EFI_USER_INFO_ACCESS_CONTROL *Control;
EFI_USER_INFO_HANDLE UserInfo;
EFI_USER_INFO *NewUserInfo;
NewUserInfo = AllocateZeroPool (
sizeof (EFI_USER_INFO) +
sizeof (EFI_USER_INFO) +
sizeof (EFI_USER_INFO_ACCESS_CONTROL)
);
ASSERT (NewUserInfo != NULL);
Control = (EFI_USER_INFO_ACCESS_CONTROL *) (NewUserInfo + 1);
Control->Type = EFI_USER_INFO_ACCESS_ENROLL_SELF;
Control->Size = sizeof (EFI_USER_INFO_ACCESS_CONTROL);
NewUserInfo->InfoType = EFI_USER_INFO_ACCESS_POLICY_RECORD;
NewUserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV |
EFI_USER_INFO_PUBLIC |
NewUserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV |
EFI_USER_INFO_PUBLIC |
EFI_USER_INFO_EXCLUSIVE;
NewUserInfo->InfoSize = sizeof (EFI_USER_INFO) + Control->Size;
UserInfo = NULL;
@@ -315,7 +315,7 @@ CallAddUser (
QuestionStr = NULL;
PromptStr = NULL;
//
// Get user name to add.
//
@@ -324,7 +324,7 @@ CallAddUser (
if (EFI_ERROR (Status)) {
if (Status != EFI_ABORTED) {
QuestionStr = GetStringById (STRING_TOKEN (STR_GET_USERNAME_FAILED));
PromptStr = GetStringById (STRING_TOKEN (STR_STROKE_KEY_CONTINUE));
PromptStr = GetStringById (STRING_TOKEN (STR_STROKE_KEY_CONTINUE));
goto Done;
}
return ;
@@ -337,7 +337,7 @@ CallAddUser (
Status = mUserManager->Create (mUserManager, &User);
if (EFI_ERROR (Status)) {
QuestionStr = GetStringById (STRING_TOKEN (STR_CREATE_PROFILE_FAILED));
PromptStr = GetStringById (STRING_TOKEN (STR_STROKE_KEY_CONTINUE));
PromptStr = GetStringById (STRING_TOKEN (STR_STROKE_KEY_CONTINUE));
} else {
//
// Add default user information.
@@ -345,7 +345,7 @@ CallAddUser (
Status = SetUserName (User, UserNameLen, UserName);
if (EFI_ERROR (Status)) {
QuestionStr = GetStringById (STRING_TOKEN (STR_USER_ALREADY_EXISTED));
PromptStr = GetStringById (STRING_TOKEN (STR_STROKE_KEY_CONTINUE));
PromptStr = GetStringById (STRING_TOKEN (STR_STROKE_KEY_CONTINUE));
goto Done;
}
@@ -354,7 +354,7 @@ CallAddUser (
SetAccessPolicy (User);
QuestionStr = GetStringById (STRING_TOKEN (STR_CREATE_PROFILE_SUCCESS));
PromptStr = GetStringById (STRING_TOKEN (STR_STROKE_KEY_CONTINUE));
PromptStr = GetStringById (STRING_TOKEN (STR_STROKE_KEY_CONTINUE));
}
Done:

View File

@@ -1,13 +1,13 @@
/** @file
The functions to delete a user profile.
Copyright (c) 2009 - 2011, 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
Copyright (c) 2009 - 2018, 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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -17,12 +17,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
Get the username from the specified user.
@param[in] User Handle of a user profile.
@param[in] User Handle of a user profile.
@retval EFI_STRING_ID The String Id of the user's username.
**/
EFI_STRING_ID
EFI_STRING_ID
GetUserName (
IN EFI_USER_PROFILE_HANDLE User
)
@@ -35,14 +35,14 @@ GetUserName (
UINTN NameLen;
CHAR16 UserName[USER_NAME_LENGTH];
EFI_STRING_ID UserId;
//
// Allocate user information memory.
//
MemSize = sizeof (EFI_USER_INFO) + 63;
Info = AllocateZeroPool (MemSize);
ASSERT (Info != NULL);
//
// Get user name information.
//
@@ -116,7 +116,7 @@ GetUserName (
/**
Add a username item in form.
@param[in] User Points to the user profile whose username is added.
@param[in] User Points to the user profile whose username is added.
@param[in] Index The index of the user in the user name list
@param[in] OpCodeHandle Points to container for dynamic created opcodes.
@@ -137,7 +137,7 @@ AddUserToForm (
if (NameId == 0) {
return ;
}
//
// Create user name option.
//
@@ -173,7 +173,7 @@ AddUserToForm (
/**
Delete the user specified by UserIndex in user profile database.
@param[in] UserIndex The index of user in the user name list
@param[in] UserIndex The index of user in the user name list
to be deleted.
**/
@@ -197,7 +197,7 @@ DeleteUser (
if (EFI_ERROR (Status)) {
goto Done;
}
while (UserIndex > 1) {
Status = mUserManager->GetNext (mUserManager, &User);
if (EFI_ERROR (Status)) {
@@ -232,7 +232,7 @@ DeleteUser (
ASSERT (Info != NULL);
DeleteCredentialFromProviders ((UINT8 *)(Info + 1), Info->InfoSize - sizeof (EFI_USER_INFO), User);
FreePool (Info);
Status = mUserManager->Delete (mUserManager, User);
if (EFI_ERROR (Status)) {
goto Done;
@@ -245,7 +245,7 @@ DeleteUser (
L"Please Press Any Key to Continue ...",
NULL
);
return ;
return ;
}
Done:

View File

@@ -1,17 +1,17 @@
/** @file
This driver is a configuration tool for adding, deleting or modifying user
profiles, including gathering the necessary information to ascertain their
identity in the future, updating user access policy and identification
This driver is a configuration tool for adding, deleting or modifying user
profiles, including gathering the necessary information to ascertain their
identity in the future, updating user access policy and identification
policy, etc.
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2018 Hewlett Packard Enterprise Development LP<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
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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -71,12 +71,12 @@ GetStringById (
/**
This function gets all the credential providers in the system and saved them
This function gets all the credential providers in the system and saved them
to mProviderInfo.
@retval EFI_SUCESS Init credential provider database successfully.
@retval Others Fail to init credential provider database.
**/
EFI_STATUS
InitProviderInfo (
@@ -86,8 +86,8 @@ InitProviderInfo (
EFI_STATUS Status;
UINTN HandleCount;
EFI_HANDLE *HandleBuf;
UINTN Index;
UINTN Index;
//
// Try to find all the user credential provider driver.
//
@@ -103,7 +103,7 @@ InitProviderInfo (
if (EFI_ERROR (Status)) {
return Status;
}
//
// Get provider infomation.
//
@@ -111,7 +111,7 @@ InitProviderInfo (
FreePool (mProviderInfo);
}
mProviderInfo = AllocateZeroPool (
sizeof (CREDENTIAL_PROVIDER_INFO) -
sizeof (CREDENTIAL_PROVIDER_INFO) -
sizeof (EFI_USER_CREDENTIAL2_PROTOCOL *) +
HandleCount * sizeof (EFI_USER_CREDENTIAL2_PROTOCOL *)
);
@@ -192,7 +192,7 @@ UserProfileManagerCallback (
if (QuestionId != QUESTIONID_USER_MANAGE) {
return EFI_SUCCESS;
}
//
// Get current user
//
@@ -202,7 +202,7 @@ UserProfileManagerCallback (
DEBUG ((DEBUG_ERROR, "Error: current user does not exist!\n"));
return EFI_NOT_READY;
}
//
// Get current user's right information.
//
@@ -210,7 +210,7 @@ UserProfileManagerCallback (
if (EFI_ERROR (Status)) {
CurrentAccessRight = EFI_USER_INFO_ACCESS_ENROLL_SELF;
}
//
// Init credential provider information.
//
@@ -218,16 +218,16 @@ UserProfileManagerCallback (
if (EFI_ERROR (Status)) {
return Status;
}
//
// Initialize the container for dynamic opcodes.
//
StartOpCodeHandle = HiiAllocateOpCodeHandle ();
ASSERT (StartOpCodeHandle != NULL);
EndOpCodeHandle = HiiAllocateOpCodeHandle ();
ASSERT (EndOpCodeHandle != NULL);
//
// Create Hii Extend Label OpCode.
//
@@ -239,7 +239,7 @@ UserProfileManagerCallback (
);
StartLabel->ExtendOpCode = EFI_IFR_EXTEND_OP_LABEL;
StartLabel->Number = LABEL_USER_MANAGE_FUNC;
EndLabel = (EFI_IFR_GUID_LABEL *) HiiCreateGuidOpCode (
EndOpCodeHandle,
&gEfiIfrTianoGuid,
@@ -248,7 +248,7 @@ UserProfileManagerCallback (
);
EndLabel->ExtendOpCode = EFI_IFR_EXTEND_OP_LABEL;
EndLabel->Number = LABEL_END;
//
// Add user profile option.
//
@@ -264,7 +264,7 @@ UserProfileManagerCallback (
0 // Action String ID
);
}
//
// Add modify user profile option.
//
@@ -276,7 +276,7 @@ UserProfileManagerCallback (
EFI_IFR_FLAG_CALLBACK, // Question flag
KEY_MODIFY_USER // Question ID
);
//
// Add delete user profile option
//
@@ -290,7 +290,7 @@ UserProfileManagerCallback (
KEY_DEL_USER // Question ID
);
}
HiiUpdateForm (
mCallbackInfo->HiiHandle, // HII handle
&gUserProfileManagerGuid, // Formset GUID
@@ -298,10 +298,10 @@ UserProfileManagerCallback (
StartOpCodeHandle, // Label for where to insert opcodes
EndOpCodeHandle // Replace data
);
HiiFreeOpCodeHandle (StartOpCodeHandle);
HiiFreeOpCodeHandle (EndOpCodeHandle);
return EFI_SUCCESS;
}
break;
@@ -311,14 +311,14 @@ UserProfileManagerCallback (
break;
case EFI_BROWSER_ACTION_CHANGED:
{
{
//
// Handle the request from form.
//
if ((Value == NULL) || (ActionRequest == NULL)) {
return EFI_INVALID_PARAMETER;
}
//
// Judge first 2 bits.
//
@@ -392,7 +392,7 @@ UserProfileManagerCallback (
//
// Change credential provider option.
//
case KEY_MODIFY_PROV:
case KEY_MODIFY_PROV:
mProviderChoice = Value->u8;
break;
@@ -556,14 +556,14 @@ UserProfileManagerCallback (
case EFI_BROWSER_ACTION_CHANGING:
{
{
//
// Handle the request from form.
//
if (Value == NULL) {
return EFI_INVALID_PARAMETER;
}
//
// Judge first 2 bits.
//
@@ -666,19 +666,19 @@ UserProfileManagerCallback (
case KEY_PERMIT_MODIFY:
DisplayLoadPermit ();
break;
//
// Forbid load device path.
//
case KEY_FORBID_MODIFY:
DisplayLoadForbid ();
break;
default:
break;
}
break;
//
// Connect device path form.
//
@@ -693,14 +693,14 @@ UserProfileManagerCallback (
case KEY_PERMIT_MODIFY:
DisplayConnectPermit ();
break;
//
// Forbid connect device path.
//
case KEY_FORBID_MODIFY:
DisplayConnectForbid ();
break;
default:
break;
}
@@ -839,7 +839,7 @@ UserProfileManagerInit (
if (EFI_ERROR (Status)) {
return EFI_SUCCESS;
}
//
// Initialize driver private data.
//
@@ -847,14 +847,14 @@ UserProfileManagerInit (
ZeroMem (&mAccessInfo, sizeof (mAccessInfo));
CallbackInfo = AllocateZeroPool (sizeof (USER_PROFILE_MANAGER_CALLBACK_INFO));
ASSERT (CallbackInfo != NULL);
ASSERT (CallbackInfo != NULL);
CallbackInfo->Signature = USER_PROFILE_MANAGER_SIGNATURE;
CallbackInfo->ConfigAccess.ExtractConfig = FakeExtractConfig;
CallbackInfo->ConfigAccess.RouteConfig = FakeRouteConfig;
CallbackInfo->ConfigAccess.Callback = UserProfileManagerCallback;
CallbackInfo->DriverHandle = NULL;
//
// Install Device Path Protocol and Config Access protocol to driver handle.
//
@@ -878,10 +878,10 @@ UserProfileManagerInit (
UserProfileManagerVfrBin,
NULL
);
ASSERT (CallbackInfo->HiiHandle != NULL);
ASSERT (CallbackInfo->HiiHandle != NULL);
mCallbackInfo = CallbackInfo;
return Status;
}

View File

@@ -1,13 +1,13 @@
/** @file
The header file for user profile manager driver.
Copyright (c) 2009 - 2013, 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
Copyright (c) 2009 - 2018, 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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -55,7 +55,7 @@ typedef struct {
EFI_TIME UsageDate;
UINTN AccessPolicyLen;
UINTN IdentityPolicyLen;
UINTN NewIdentityPolicyLen;
UINTN NewIdentityPolicyLen;
UINT8 *AccessPolicy;
UINT8 *IdentityPolicy;
UINT8 *NewIdentityPolicy;
@@ -197,7 +197,7 @@ DeleteUser (
/**
Add a username item in form.
@param[in] User Points to the user profile whose username is added.
@param[in] User Points to the user profile whose username is added.
@param[in] Index The index of the user in the user name list.
@param[in] OpCodeHandle Points to container for dynamic created opcodes.
@@ -216,7 +216,7 @@ AddUserToForm (
and access policy are displayed.
@param[in] UserIndex The index of the user in display list to modify.
**/
VOID
ModifyUserInfo (
@@ -224,7 +224,7 @@ ModifyUserInfo (
);
/**
Get the username from user input and update username string in Hii
Get the username from user input and update username string in Hii
database with it.
**/
@@ -253,11 +253,11 @@ AddIdentityPolicyItem (
/**
Save the identity policy and update UI with it.
This function will verify the new identity policy, in current implementation,
This function will verify the new identity policy, in current implementation,
the identity policy can be: T, P & P & P & ..., P | P | P | ...
Here, "T" means "True", "P" means "Credential Provider", "&" means "and", "|" means "or".
Other identity policies are not supported.
Other identity policies are not supported.
**/
VOID
@@ -270,7 +270,7 @@ SaveIdentityPolicy (
In this form, access right, access setu,p and access boot order are dynamically
added. Load devicepath and connect devicepath are displayed too.
**/
VOID
ModidyAccessPolicy (
@@ -278,7 +278,7 @@ ModidyAccessPolicy (
);
/**
Collect all the access policy data to mUserInfo.AccessPolicy,
Collect all the access policy data to mUserInfo.AccessPolicy,
and save it to user profile.
**/
@@ -338,23 +338,23 @@ DisplayConnectForbid (
);
/**
Delete the specified device path by DriverIndex from the forbid device path
Delete the specified device path by DriverIndex from the forbid device path
list (mAccessInfo.LoadForbid).
@param[in] DriverIndex The index of driver in a forbidden device path list.
**/
VOID
DeleteFromForbidLoad (
IN UINT16 DriverIndex
);
/**
Add the specified device path by DriverIndex to the forbid device path
Add the specified device path by DriverIndex to the forbid device path
list (mAccessInfo.LoadForbid).
@param[in] DriverIndex The index of driver saved in driver options.
**/
VOID
AddToForbidLoad (
@@ -363,11 +363,11 @@ AddToForbidLoad (
/**
Get user name from the popup windows.
@param[in, out] UserNameLen On entry, point to the buffer lengh of UserName.
On exit, point to the input user name length.
@param[out] UserName The buffer to hold the input user name.
@retval EFI_ABORTED It is given up by pressing 'ESC' key.
@retval EFI_NOT_READY Not a valid input at all.
@retval EFI_SUCCESS Get a user name successfully.
@@ -385,7 +385,7 @@ GetUserNameInput (
@param[in] User Handle of the user whose information will be searched.
@param[in] InfoType The user information type to find.
@param[out] UserInfo Points to user information handle found.
@retval EFI_SUCCESS Find the user information successfully.
@retval Others Fail to find the user information.
@@ -418,7 +418,7 @@ ResolveIdentityPolicy (
@param[in] ValidLen The valid access policy length.
@param[in] ExpandLen The length that is needed to expand.
**/
VOID
ExpandMemory (
@@ -428,7 +428,7 @@ ExpandMemory (
/**
Delete User's credental from all the providers that exist in User's identity policy.
@param[in] IdentityPolicy Point to User's identity policy.
@param[in] IdentityPolicyLen The length of the identity policy.
@param[in] User Points to user profile.
@@ -438,7 +438,7 @@ VOID
DeleteCredentialFromProviders (
IN UINT8 *IdentityPolicy,
IN UINTN IdentityPolicyLen,
IN EFI_USER_PROFILE_HANDLE User
IN EFI_USER_PROFILE_HANDLE User
);
#endif

View File

@@ -1,13 +1,13 @@
/** @file
The form data for user profile manager driver.
Copyright (c) 2009 - 2011, 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
Copyright (c) 2009 - 2018, 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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -47,7 +47,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define LABEL_END 0x00F0
//
// First form key (Add/modify/del user profile).
// First form key (Add/modify/del user profile).
// First 2 bits (bit 16~15).
//
#define KEY_MODIFY_USER 0x4000
@@ -77,7 +77,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
// Specified key, used in VFR (KEY_MODIFY_USER | KEY_SELECT_USER | KEY_MODIFY_NAME).
//
#define KEY_MODIFY_USER_NAME 0x5200
#define KEY_MODIFY_USER_NAME 0x5200
//
// Modify identity policy form key.
@@ -134,7 +134,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
// Device path modify key.
// 2 bits (bit 12~11).
//
//
#define KEY_LOAD_PERMIT_MODIFY 0x0000
#define KEY_LOAD_FORBID_MODIFY 0x0400
#define KEY_CONNECT_PERMIT_MODIFY 0x0800

View File

@@ -4,7 +4,7 @@
# By this module, user can add/update/delete user profiles, and can also
# modify the user access policy and the user identification policy.
#
# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2009 - 2018, 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
@@ -50,7 +50,7 @@
HiiLib
UefiLib
DevicePathLib
[Guids]
gEfiIfrTianoGuid ## SOMETIMES_CONSUMES ## GUID
gEfiUserInfoAccessSetupAdminGuid ## SOMETIMES_CONSUMES ## GUID
@@ -66,7 +66,7 @@
[Depex]
gEfiUserManagerProtocolGuid
[UserExtensions.TianoCore."ExtraFiles"]
UserProfileManagerExtra.uni

View File

@@ -1,7 +1,7 @@
// /** @file
// UserProfileManager Localized Strings and Content
//
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
// Copyright (c) 2013 - 2018, 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
@@ -12,8 +12,8 @@
//
// **/
#string STR_PROPERTIES_MODULE_NAME
#language en-US
#string STR_PROPERTIES_MODULE_NAME
#language en-US
"User Profile Manager"

View File

@@ -1,13 +1,13 @@
/** @file
String definitions for User Profile Manager driver.
Copyright (c) 2009 - 2010, 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
Copyright (c) 2009 - 2018, 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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -20,139 +20,139 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#string STR_FORMSET_TITLE #language en-US "User Manager"
#language fr-FR "User Manager(French)"
#string STR_TITLE_HELP #language en-US "This selection will take you to the User Manager"
#language fr-FR "This selection will take you to the User Manager(French)"
#language fr-FR "This selection will take you to the User Manager(French)"
#string STR_USERMAN_TITLE #language en-US "User Manager"
#language fr-FR "User Manager(French)"
#string STR_ADD_USER_TITLE #language en-US "Add User Profile"
#language fr-FR "Add User Profile(French)"
#string STR_ADD_USER_HELP #language en-US "Add User Profile to User Database"
#language fr-FR "Add User Profile to User Database(French)"
#string STR_MODIFY_USER_TITLE #language en-US "Modify User Profile"
#language fr-FR "Modify User Profile(French)"
#string STR_MODIFY_USER_HELP #language en-US "Modify User Profile Information"
#language fr-FR "Modify User Profile Information(French)"
#string STR_DELETE_USER_TITLE #language en-US "Delete User Profile"
#language fr-FR "Delete User Profile(French)"
#string STR_ADD_USER_TITLE #language en-US "Add User Profile"
#language fr-FR "Add User Profile(French)"
#string STR_ADD_USER_HELP #language en-US "Add User Profile to User Database"
#language fr-FR "Add User Profile to User Database(French)"
#string STR_MODIFY_USER_TITLE #language en-US "Modify User Profile"
#language fr-FR "Modify User Profile(French)"
#string STR_MODIFY_USER_HELP #language en-US "Modify User Profile Information"
#language fr-FR "Modify User Profile Information(French)"
#string STR_DELETE_USER_TITLE #language en-US "Delete User Profile"
#language fr-FR "Delete User Profile(French)"
#string STR_DELETE_USER_HELP #language en-US "Delete User Profile from User Database"
#language fr-FR "Delete User Profile from User Database(French)"
#string STR_USER_INFO #language en-US "User Profile Information"
#language fr-FR "User Profile Information(French)"
#string STR_USER_NAME #language en-US "User Name"
#language fr-FR "User Name(French)"
#string STR_USER_NAME_VAL #language en-US ""
#language fr-FR ""
#string STR_CREATE_DATE #language en-US "Create Date"
#language fr-FR "Create Date(French)"
#string STR_CREATE_DATE_VAL #language en-US ""
#language fr-FR ""
#string STR_USAGE_DATE #language en-US "Usage Date"
#language fr-FR "Usage Date(French)"
#string STR_USAGE_DATE_VAL #language en-US ""
#language fr-FR ""
#string STR_USAGE_COUNT #language en-US "Usage Count"
#language fr-FR "Usage Count(French)"
#string STR_USAGE_COUNT_VAL #language en-US ""
#language fr-FR ""
#string STR_IDENTIFY_POLICY #language en-US "Identify Policy"
#language fr-FR "Identify Policy(French)"
#string STR_IDENTIFY_POLICY_VAL #language en-US ""
#language fr-FR ""
#string STR_ACCESS_POLICY #language en-US "Access Policy"
#language fr-FR "Access Policy(French)"
#string STR_SAVE #language en-US "Save & Exit"
#language fr-FR "Save & Exit(French)"
#string STR_IDENTIFY_SAVE_HELP #language en-US "Save Identify Policy and Exit"
#language fr-FR "Save Identify Policy and Exit(French)"
#string STR_PROVIDER #language en-US "Credential Provider"
#language fr-FR "Credential Provider(French)"
#string STR_PROVIDER_HELP #language en-US "Select Credential Provider Option"
#language fr-FR "Select Credential Provider Option(French)"
#string STR_OR_CON #language en-US "Or"
#language fr-FR "Or(French)"
#string STR_AND_CON #language en-US "And"
#language fr-FR "And(French)"
#string STR_CONNECTOR #language en-US "Logical Connector"
#language fr-FR "Logical Connector(French)"
#string STR_CONNECTOR_HELP #language en-US "Select Logical Connector Option"
#language fr-FR "Select Logical Connector Option(French)"
#string STR_IDENTIFY_POLICY_VALUE #language en-US ""
#language fr-FR ""
#language fr-FR "Delete User Profile from User Database(French)"
#string STR_USER_INFO #language en-US "User Profile Information"
#language fr-FR "User Profile Information(French)"
#string STR_USER_NAME #language en-US "User Name"
#language fr-FR "User Name(French)"
#string STR_USER_NAME_VAL #language en-US ""
#language fr-FR ""
#string STR_CREATE_DATE #language en-US "Create Date"
#language fr-FR "Create Date(French)"
#string STR_CREATE_DATE_VAL #language en-US ""
#language fr-FR ""
#string STR_USAGE_DATE #language en-US "Usage Date"
#language fr-FR "Usage Date(French)"
#string STR_USAGE_DATE_VAL #language en-US ""
#language fr-FR ""
#string STR_USAGE_COUNT #language en-US "Usage Count"
#language fr-FR "Usage Count(French)"
#string STR_USAGE_COUNT_VAL #language en-US ""
#language fr-FR ""
#string STR_IDENTIFY_POLICY #language en-US "Identify Policy"
#language fr-FR "Identify Policy(French)"
#string STR_IDENTIFY_POLICY_VAL #language en-US ""
#language fr-FR ""
#string STR_ACCESS_POLICY #language en-US "Access Policy"
#language fr-FR "Access Policy(French)"
#string STR_SAVE #language en-US "Save & Exit"
#language fr-FR "Save & Exit(French)"
#string STR_IDENTIFY_SAVE_HELP #language en-US "Save Identify Policy and Exit"
#language fr-FR "Save Identify Policy and Exit(French)"
#string STR_PROVIDER #language en-US "Credential Provider"
#language fr-FR "Credential Provider(French)"
#string STR_PROVIDER_HELP #language en-US "Select Credential Provider Option"
#language fr-FR "Select Credential Provider Option(French)"
#string STR_OR_CON #language en-US "Or"
#language fr-FR "Or(French)"
#string STR_AND_CON #language en-US "And"
#language fr-FR "And(French)"
#string STR_CONNECTOR #language en-US "Logical Connector"
#language fr-FR "Logical Connector(French)"
#string STR_CONNECTOR_HELP #language en-US "Select Logical Connector Option"
#language fr-FR "Select Logical Connector Option(French)"
#string STR_IDENTIFY_POLICY_VALUE #language en-US ""
#language fr-FR ""
#string STR_IDENTIFY_POLICY_HELP #language en-US "Current Identify Policy"
#language fr-FR "Current Identify Policy(French)"
#string STR_ADD_OPTION #language en-US "Add Option"
#language fr-FR "Add Option(French)"
#string STR_ADD_OPTION_HELP #language en-US "Add This Option to Identify Policy"
#language fr-FR "Add This Option to Identify Policy(French)"
#string STR_ACCESS_SAVE_HELP #language en-US "Save Access Policy and Exit"
#language fr-FR "Save Access Policy and Exit(French)"
#string STR_ACCESS_RIGHT #language en-US "Access Right"
#language fr-FR "Access Right(French)"
#string STR_ACCESS_RIGHT_HELP #language en-US "Select Access Right Option"
#language fr-FR "Select Access Right Option(French)"
#string STR_NORMAL #language en-US "Normal"
#language fr-FR "Normal(French)"
#string STR_ENROLL #language en-US "Enroll"
#language fr-FR "Enroll(French)"
#string STR_MANAGE #language en-US "Manage"
#language fr-FR "Manage(French)"
#string STR_ACCESS_SETUP #language en-US "Access Setup"
#language fr-FR "Access Setup(French)"
#string STR_ACCESS_SETUP_HELP #language en-US "Select Access Setup Option"
#language fr-FR "Selelct Access Setup Option(French)"
#string STR_RESTRICTED #language en-US "Restricted"
#language fr-FR "Restricted(French)"
#string STR_ADMIN #language en-US "Admin"
#language fr-FR "Admin(French)"
#string STR_BOOR_ORDER #language en-US "Access Boot Order"
#language fr-FR "Access Boot Order(French)"
#string STR_BOOT_ORDER_HELP #language en-US "Select Access Boot Order Option"
#language fr-FR "Select Access Boot Order Option(French)"
#string STR_INSERT #language en-US "Insert"
#language fr-FR "Insert(French)"
#string STR_APPEND #language en-US "Append"
#language fr-FR "Append(French)"
#string STR_REPLACE #language en-US "Replace"
#language fr-FR "Replace(French)"
#string STR_NODEFAULT #language en-US "Nodefault"
#language fr-FR "Nodefault(French)"
#string STR_LOAD #language en-US "Load Device Path"
#language fr-FR "Load Device Path(French)"
#string STR_LOAD_HELP #language en-US "Select Permit/Forbid Load Device Path"
#language fr-FR "Select Permit/Forbid Load Device Path(French)"
#string STR_CONNECT #language en-US "Connect Device Path"
#language fr-FR "Connect Device Path(French)"
#string STR_CONNECT_HELP #language en-US "Select Permit/Forbid Connect Device Path"
#language fr-FR "Select Permit/Forbid Connect Device Path(French)"
#string STR_LOAD_PERMIT #language en-US "Permit Load Device Path"
#language fr-FR "Permit Load Device Path(French)"
#string STR_LOAD_PERMIT_HELP #language en-US "Change Permit Load Device Path to Forbid"
#language fr-FR "Change Permit Load Device Path to Forbid(French)"
#string STR_LOAD_FORBID #language en-US "Forbid Load Device Path"
#language fr-FR "Forbid Load Device Path(French)"
#string STR_LOAD_FORBID_HELP #language en-US "Change Forbid Load Device Path to Permit"
#language fr-FR "Change Forbid Load Device Path to Permit(French)"
#string STR_CONNECT_PERMIT #language en-US "Permit Connect Device Path"
#language fr-FR "Permit Connect Device Path(French)"
#string STR_CONNECT_PERMIT_HELP #language en-US "Change Permit Connect Device Path to Forbid"
#language fr-FR "Change Permit Connect Device Path to Forbid(French)"
#string STR_CONNECT_FORBID #language en-US "Forbid Connect Device Path"
#language fr-FR "Forbid Connect Device Path(French)"
#string STR_CONNECT_FORBID_HELP #language en-US "Change Forbid Connect Device Path to Permit"
#language fr-FR "Change Forbid Connect Device Path to Permit(French)"
#string STR_PRESS_KEY_CONTINUE #language en-US "Press ENTER to Continue, Other Key to Cancel ..."
#language fr-FR "Press ENTER to Continue, Other Key to Cancel ...(French)"
#string STR_MOVE_TO_FORBID_LIST #language en-US "Are You Sure to Move It to Forbid List?"
#language fr-FR "Are You Sure to Move It to Forbid List?(French)"
#string STR_MOVE_TO_PERMIT_LIST #language en-US "Are You Sure to Move It to Permit List?"
#language fr-FR "Are You Sure to Move It to Permit List?(French)"
#language fr-FR "Current Identify Policy(French)"
#string STR_ADD_OPTION #language en-US "Add Option"
#language fr-FR "Add Option(French)"
#string STR_ADD_OPTION_HELP #language en-US "Add This Option to Identify Policy"
#language fr-FR "Add This Option to Identify Policy(French)"
#string STR_ACCESS_SAVE_HELP #language en-US "Save Access Policy and Exit"
#language fr-FR "Save Access Policy and Exit(French)"
#string STR_ACCESS_RIGHT #language en-US "Access Right"
#language fr-FR "Access Right(French)"
#string STR_ACCESS_RIGHT_HELP #language en-US "Select Access Right Option"
#language fr-FR "Select Access Right Option(French)"
#string STR_NORMAL #language en-US "Normal"
#language fr-FR "Normal(French)"
#string STR_ENROLL #language en-US "Enroll"
#language fr-FR "Enroll(French)"
#string STR_MANAGE #language en-US "Manage"
#language fr-FR "Manage(French)"
#string STR_ACCESS_SETUP #language en-US "Access Setup"
#language fr-FR "Access Setup(French)"
#string STR_ACCESS_SETUP_HELP #language en-US "Select Access Setup Option"
#language fr-FR "Selelct Access Setup Option(French)"
#string STR_RESTRICTED #language en-US "Restricted"
#language fr-FR "Restricted(French)"
#string STR_ADMIN #language en-US "Admin"
#language fr-FR "Admin(French)"
#string STR_BOOR_ORDER #language en-US "Access Boot Order"
#language fr-FR "Access Boot Order(French)"
#string STR_BOOT_ORDER_HELP #language en-US "Select Access Boot Order Option"
#language fr-FR "Select Access Boot Order Option(French)"
#string STR_INSERT #language en-US "Insert"
#language fr-FR "Insert(French)"
#string STR_APPEND #language en-US "Append"
#language fr-FR "Append(French)"
#string STR_REPLACE #language en-US "Replace"
#language fr-FR "Replace(French)"
#string STR_NODEFAULT #language en-US "Nodefault"
#language fr-FR "Nodefault(French)"
#string STR_LOAD #language en-US "Load Device Path"
#language fr-FR "Load Device Path(French)"
#string STR_LOAD_HELP #language en-US "Select Permit/Forbid Load Device Path"
#language fr-FR "Select Permit/Forbid Load Device Path(French)"
#string STR_CONNECT #language en-US "Connect Device Path"
#language fr-FR "Connect Device Path(French)"
#string STR_CONNECT_HELP #language en-US "Select Permit/Forbid Connect Device Path"
#language fr-FR "Select Permit/Forbid Connect Device Path(French)"
#string STR_LOAD_PERMIT #language en-US "Permit Load Device Path"
#language fr-FR "Permit Load Device Path(French)"
#string STR_LOAD_PERMIT_HELP #language en-US "Change Permit Load Device Path to Forbid"
#language fr-FR "Change Permit Load Device Path to Forbid(French)"
#string STR_LOAD_FORBID #language en-US "Forbid Load Device Path"
#language fr-FR "Forbid Load Device Path(French)"
#string STR_LOAD_FORBID_HELP #language en-US "Change Forbid Load Device Path to Permit"
#language fr-FR "Change Forbid Load Device Path to Permit(French)"
#string STR_CONNECT_PERMIT #language en-US "Permit Connect Device Path"
#language fr-FR "Permit Connect Device Path(French)"
#string STR_CONNECT_PERMIT_HELP #language en-US "Change Permit Connect Device Path to Forbid"
#language fr-FR "Change Permit Connect Device Path to Forbid(French)"
#string STR_CONNECT_FORBID #language en-US "Forbid Connect Device Path"
#language fr-FR "Forbid Connect Device Path(French)"
#string STR_CONNECT_FORBID_HELP #language en-US "Change Forbid Connect Device Path to Permit"
#language fr-FR "Change Forbid Connect Device Path to Permit(French)"
#string STR_PRESS_KEY_CONTINUE #language en-US "Press ENTER to Continue, Other Key to Cancel ..."
#language fr-FR "Press ENTER to Continue, Other Key to Cancel ...(French)"
#string STR_MOVE_TO_FORBID_LIST #language en-US "Are You Sure to Move It to Forbid List?"
#language fr-FR "Are You Sure to Move It to Forbid List?(French)"
#string STR_MOVE_TO_PERMIT_LIST #language en-US "Are You Sure to Move It to Permit List?"
#language fr-FR "Are You Sure to Move It to Permit List?(French)"
#string STR_STROKE_KEY_CONTINUE #language en-US "Please Press Any Key to Continue ..."
#language fr-FR "Please Press Any Key to Continue ... (French)"
#language fr-FR "Please Press Any Key to Continue ... (French)"
#string STR_CREATE_PROFILE_FAILED #language en-US "Create New User Profile Failed!"
#language fr-FR "Create New User Profile Failed! (French)"
#language fr-FR "Create New User Profile Failed! (French)"
#string STR_CREATE_PROFILE_SUCCESS #language en-US "Create New User Profile Succeed!"
#language fr-FR "Create New User Profile Succeed! (French)"
#language fr-FR "Create New User Profile Succeed! (French)"
#string STR_USER_ALREADY_EXISTED #language en-US "User Name Had Already Existed."
#language fr-FR "User Name Had Already Existed. (French)"
#language fr-FR "User Name Had Already Existed. (French)"
#string STR_GET_USERNAME_FAILED #language en-US "Failed To Get User Name."
#language fr-FR "Failed To Get User Name. (French)"
#language fr-FR "Failed To Get User Name. (French)"

View File

@@ -1,13 +1,13 @@
/** @file
The functions to modify a user profile.
Copyright (c) 2009 - 2015, 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
Copyright (c) 2009 - 2018, 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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -127,7 +127,7 @@ GetAllUserInfo (
mUserInfo.CreateDateExist = FALSE;
mUserInfo.UsageDateExist = FALSE;
mUserInfo.UsageCount = 0;
mUserInfo.AccessPolicyLen = 0;
mUserInfo.AccessPolicyModified = FALSE;
if (mUserInfo.AccessPolicy != NULL) {
@@ -140,7 +140,7 @@ GetAllUserInfo (
FreePool (mUserInfo.IdentityPolicy);
mUserInfo.IdentityPolicy = NULL;
}
//
// Allocate user information memory.
//
@@ -149,7 +149,7 @@ GetAllUserInfo (
if (Info == NULL) {
return ;
}
//
// Get each user information.
//
@@ -164,10 +164,10 @@ GetAllUserInfo (
//
InfoSize = MemSize;
Status = mUserManager->GetInfo (
mUserManager,
mModifyUser,
UserInfo,
Info,
mUserManager,
mModifyUser,
UserInfo,
Info,
&InfoSize
);
if (Status == EFI_BUFFER_TOO_SMALL) {
@@ -281,12 +281,12 @@ ResolveDate (
UnicodeSPrint (
Str + StrLen (Str),
DateBufLen,
L"%2d:%2d:%2d",
L"%2d:%2d:%2d",
Date->Hour,
Date->Minute,
Date->Second
);
HiiSetString (mCallbackInfo->HiiHandle, DateId, Str, NULL);
FreePool (Str);
}
@@ -308,7 +308,7 @@ ResolveCount (
{
CHAR16 Count[10];
UnicodeSPrint (Count, 20, L"%d", CountVal);
UnicodeSPrint (Count, 20, L"%d", CountVal);
HiiSetString (mCallbackInfo->HiiHandle, CountId, Count, NULL);
}
@@ -318,7 +318,7 @@ ResolveCount (
Unicode string.
@param[in, out] Source1 On entry, point to a Null-terminated Unicode string.
On exit, point to a new concatenated Unicode string
On exit, point to a new concatenated Unicode string
@param[in] Source2 Pointer to a Null-terminated Unicode string.
**/
@@ -380,9 +380,9 @@ ResolveIdentityPolicy (
EFI_STRING_ID ProvId;
EFI_HII_HANDLE HiiHandle;
EFI_USER_CREDENTIAL2_PROTOCOL *UserCredential;
TmpStr = NULL;
//
// Resolve each policy.
//
@@ -413,10 +413,10 @@ ResolveIdentityPolicy (
case EFI_USER_INFO_IDENTITY_CREDENTIAL_TYPE:
for (Index = 0; Index < mProviderInfo->Count; Index++) {
UserCredential = mProviderInfo->Provider[Index];
if (CompareGuid ((EFI_GUID *) (Identity + 1), &UserCredential->Type)) {
if (CompareGuid ((EFI_GUID *) (Identity + 1), &UserCredential->Type)) {
UserCredential->Title (
UserCredential,
&HiiHandle,
UserCredential,
&HiiHandle,
&ProvId
);
ProvStr = HiiGetString (HiiHandle, ProvId, NULL);
@@ -432,7 +432,7 @@ ResolveIdentityPolicy (
case EFI_USER_INFO_IDENTITY_CREDENTIAL_PROVIDER:
for (Index = 0; Index < mProviderInfo->Count; Index++) {
UserCredential = mProviderInfo->Provider[Index];
if (CompareGuid ((EFI_GUID *) (Identity + 1), &UserCredential->Identifier)) {
if (CompareGuid ((EFI_GUID *) (Identity + 1), &UserCredential->Identifier)) {
UserCredential->Title (
UserCredential,
&HiiHandle,
@@ -466,7 +466,7 @@ ResolveIdentityPolicy (
and access policy.
@param[in] UserIndex The index of the user in display list to modify.
**/
VOID
ModifyUserInfo (
@@ -527,7 +527,7 @@ ModifyUserInfo (
}
UserIndex--;
}
//
// Get user profile information.
//
@@ -541,7 +541,7 @@ ModifyUserInfo (
mUserInfo.UserName,
NULL
);
//
// Update create date.
//
@@ -555,7 +555,7 @@ ModifyUserInfo (
NULL
);
}
//
// Add usage date.
//
@@ -569,12 +569,12 @@ ModifyUserInfo (
NULL
);
}
//
// Add usage count.
//
ResolveCount ((UINT32) mUserInfo.UsageCount, STRING_TOKEN (STR_USAGE_COUNT_VAL));
//
// Add identity policy.
//
@@ -594,7 +594,7 @@ ModifyUserInfo (
KEY_MODIFY_USER | KEY_SELECT_USER | KEY_MODIFY_IP // Question ID
);
}
//
// Add access policy.
//
@@ -643,7 +643,7 @@ ResolveAccessPolicy (
UINT8 *AccessData;
//
// Set default value
// Set default value
//
mAccessInfo.AccessRight = EFI_USER_INFO_ACCESS_ENROLL_SELF;
mAccessInfo.AccessSetup = ACCESS_SETUP_RESTRICTED;
@@ -653,13 +653,13 @@ ResolveAccessPolicy (
mAccessInfo.LoadForbidLen = 0;
mAccessInfo.ConnectPermitLen = 0;
mAccessInfo.ConnectForbidLen = 0;
//
// Get each user access policy.
//
OffSet = 0;
while (OffSet < mUserInfo.AccessPolicyLen) {
CopyMem (&Control, mUserInfo.AccessPolicy + OffSet, sizeof (Control));
CopyMem (&Control, mUserInfo.AccessPolicy + OffSet, sizeof (Control));
ValLen = Control.Size - sizeof (Control);
switch (Control.Type) {
case EFI_USER_INFO_ACCESS_ENROLL_SELF:
@@ -754,7 +754,7 @@ ResolveAccessPolicy (
@param[in] User Handle of the user whose information will be searched.
@param[in] InfoType The user information type to find.
@param[out] UserInfo Points to user information handle found.
@retval EFI_SUCCESS Find the user information successfully.
@retval Others Fail to find the user information.
@@ -784,7 +784,7 @@ FindInfoByType (
if (Info == NULL) {
return EFI_OUT_OF_RESOURCES;
}
//
// Get each user information.
//
@@ -836,7 +836,7 @@ FindInfoByType (
In this form, access right, access setup and access boot order are dynamically
added. Load devicepath and connect devicepath are displayed too.
**/
VOID
ModidyAccessPolicy (
@@ -849,7 +849,7 @@ ModidyAccessPolicy (
EFI_IFR_GUID_LABEL *StartLabel;
EFI_IFR_GUID_LABEL *EndLabel;
VOID *DefaultOpCodeHandle;
//
// Initialize the container for dynamic opcodes.
//
@@ -893,7 +893,7 @@ ModidyAccessPolicy (
ASSERT (OptionsOpCodeHandle != NULL);
DefaultOpCodeHandle = HiiAllocateOpCodeHandle ();
ASSERT (DefaultOpCodeHandle != NULL);
HiiCreateOneOfOptionOpCode (
OptionsOpCodeHandle,
STRING_TOKEN (STR_NORMAL),
@@ -919,12 +919,12 @@ ModidyAccessPolicy (
);
HiiCreateDefaultOpCode (
DefaultOpCodeHandle,
EFI_HII_DEFAULT_CLASS_STANDARD,
EFI_IFR_NUMERIC_SIZE_1,
DefaultOpCodeHandle,
EFI_HII_DEFAULT_CLASS_STANDARD,
EFI_IFR_NUMERIC_SIZE_1,
mAccessInfo.AccessRight
);
HiiCreateOneOfOpCode (
StartOpCodeHandle, // Container for dynamic created opcodes
KEY_MODIFY_USER | KEY_SELECT_USER | KEY_MODIFY_AP | KEY_MODIFY_RIGHT, // Question ID
@@ -948,7 +948,7 @@ ModidyAccessPolicy (
ASSERT (OptionsOpCodeHandle != NULL);
DefaultOpCodeHandle = HiiAllocateOpCodeHandle ();
ASSERT (DefaultOpCodeHandle != NULL);
HiiCreateOneOfOptionOpCode (
OptionsOpCodeHandle,
STRING_TOKEN (STR_RESTRICTED),
@@ -956,7 +956,7 @@ ModidyAccessPolicy (
EFI_IFR_NUMERIC_SIZE_1,
ACCESS_SETUP_RESTRICTED
);
HiiCreateOneOfOptionOpCode (
OptionsOpCodeHandle,
STRING_TOKEN (STR_NORMAL),
@@ -974,11 +974,11 @@ ModidyAccessPolicy (
);
HiiCreateDefaultOpCode (
DefaultOpCodeHandle,
EFI_HII_DEFAULT_CLASS_STANDARD,
EFI_IFR_NUMERIC_SIZE_1,
DefaultOpCodeHandle,
EFI_HII_DEFAULT_CLASS_STANDARD,
EFI_IFR_NUMERIC_SIZE_1,
mAccessInfo.AccessSetup
);
);
HiiCreateOneOfOpCode (
StartOpCodeHandle, // Container for dynamic created opcodes
@@ -994,7 +994,7 @@ ModidyAccessPolicy (
);
HiiFreeOpCodeHandle (DefaultOpCodeHandle);
HiiFreeOpCodeHandle (OptionsOpCodeHandle);
//
// Add boot order one-of-code.
//
@@ -1002,7 +1002,7 @@ ModidyAccessPolicy (
ASSERT (OptionsOpCodeHandle != NULL);
DefaultOpCodeHandle = HiiAllocateOpCodeHandle ();
ASSERT (DefaultOpCodeHandle != NULL);
HiiCreateOneOfOptionOpCode (
OptionsOpCodeHandle,
STRING_TOKEN (STR_INSERT),
@@ -1026,7 +1026,7 @@ ModidyAccessPolicy (
EFI_IFR_NUMERIC_SIZE_4,
EFI_USER_INFO_ACCESS_BOOT_ORDER_REPLACE
);
HiiCreateOneOfOptionOpCode (
OptionsOpCodeHandle,
STRING_TOKEN (STR_NODEFAULT),
@@ -1036,12 +1036,12 @@ ModidyAccessPolicy (
);
HiiCreateDefaultOpCode (
DefaultOpCodeHandle,
EFI_HII_DEFAULT_CLASS_STANDARD,
EFI_IFR_NUMERIC_SIZE_4,
DefaultOpCodeHandle,
EFI_HII_DEFAULT_CLASS_STANDARD,
EFI_IFR_NUMERIC_SIZE_4,
mAccessInfo.AccessBootOrder
);
HiiCreateOneOfOpCode (
StartOpCodeHandle, // Container for dynamic created opcodes
KEY_MODIFY_USER | KEY_SELECT_USER | KEY_MODIFY_AP | KEY_MODIFY_BOOT, // Question ID
@@ -1054,7 +1054,7 @@ ModidyAccessPolicy (
OptionsOpCodeHandle, // Option Opcode list
DefaultOpCodeHandle // Default Opcode
);
HiiFreeOpCodeHandle (DefaultOpCodeHandle);
HiiFreeOpCodeHandle (DefaultOpCodeHandle);
HiiFreeOpCodeHandle (OptionsOpCodeHandle);
//
@@ -1078,7 +1078,7 @@ ModidyAccessPolicy (
@param[in] ValidLen The valid access policy length.
@param[in] ExpandLen The length that is needed to expand.
**/
VOID
ExpandMemory (
@@ -1107,7 +1107,7 @@ ExpandMemory (
/**
Get the username from user input, and update username string in the Hii
Get the username from user input, and update username string in the Hii
database with it.
**/
@@ -1142,7 +1142,7 @@ ModifyUserName (
}
return ;
}
//
// Check whether the username had been used or not.
//
@@ -1178,15 +1178,15 @@ ModifyUserName (
FreePool (Info);
return ;
}
//
// Update username display in the form.
//
CopyMem (mUserInfo.UserName, UserName, Len);
HiiSetString (
mCallbackInfo->HiiHandle,
STRING_TOKEN (STR_USER_NAME_VAL),
mUserInfo.UserName,
mCallbackInfo->HiiHandle,
STRING_TOKEN (STR_USER_NAME_VAL),
mUserInfo.UserName,
NULL
);
@@ -1303,7 +1303,7 @@ ModifyIdentityPolicy (
HiiFreeOpCodeHandle (OptionsOpCodeHandle);
}
//
// Add logical connector Option OpCode.
//
@@ -1345,8 +1345,8 @@ ModifyIdentityPolicy (
// Update identity policy in the form.
//
ResolveIdentityPolicy (
mUserInfo.IdentityPolicy,
mUserInfo.IdentityPolicyLen,
mUserInfo.IdentityPolicy,
mUserInfo.IdentityPolicyLen,
STRING_TOKEN (STR_IDENTIFY_POLICY_VALUE)
);
@@ -1404,7 +1404,7 @@ GetAccessRight (
if (Info == NULL) {
return EFI_OUT_OF_RESOURCES;
}
//
// Get user access information.
//
@@ -1445,7 +1445,7 @@ GetAccessRight (
if (EFI_ERROR (Status)) {
break;
}
//
// Check user information.
//