Data Structures | |
struct | CREDENTIAL_PROVIDER_INFO |
struct | USER_INFO |
struct | USER_INFO_ACCESS |
struct | USER_PROFILE_MANAGER_CALLBACK_INFO |
struct | HII_VENDOR_DEVICE_PATH |
Defines | |
#define | USER_NAME_LENGTH 17 |
#define | USER_PROFILE_MANAGER_SIGNATURE SIGNATURE_32 ('U', 'P', 'M', 'S') |
Functions | |
CHAR16 * | GetStringById (IN EFI_STRING_ID Id) |
VOID | CallAddUser (VOID) |
VOID | SelectUserToModify (VOID) |
VOID | SelectUserToDelete (VOID) |
VOID | DeleteUser (IN UINT8 UserIndex) |
VOID | AddUserToForm (IN EFI_USER_PROFILE_HANDLE User, IN UINT16 Index, IN VOID *OpCodeHandle) |
VOID | ModifyUserInfo (IN UINT8 UserIndex) |
VOID | ModifyUserName (VOID) |
VOID | ModifyIdentityPolicy (VOID) |
VOID | AddIdentityPolicyItem (VOID) |
VOID | SaveIdentityPolicy (VOID) |
VOID | ModidyAccessPolicy (VOID) |
VOID | SaveAccessPolicy (VOID) |
EFI_STATUS | GetAccessRight (OUT UINT32 *AccessRight) |
VOID | DisplayLoadPermit (VOID) |
VOID | DisplayLoadForbid (VOID) |
VOID | DisplayConnectPermit (VOID) |
VOID | DisplayConnectForbid (VOID) |
VOID | DeleteFromForbidLoad (IN UINT16 DriverIndex) |
VOID | AddToForbidLoad (IN UINT16 DriverIndex) |
EFI_STATUS | GetUserNameInput (IN OUT UINTN *UserNameLen, OUT CHAR16 *UserName) |
EFI_STATUS | FindInfoByType (IN EFI_USER_PROFILE_HANDLE User, IN UINT8 InfoType, OUT EFI_USER_INFO_HANDLE *UserInfo) |
VOID | ResolveIdentityPolicy (IN UINT8 *Ip, IN UINTN IpLen, IN EFI_STRING_ID IpStringId) |
VOID | ExpandMemory (IN UINTN ValidLen, IN UINTN ExpandLen) |
VOID | DeleteCredentialFromProviders (IN UINT8 *IdentityPolicy, IN UINTN IdentityPolicyLen, IN EFI_USER_PROFILE_HANDLE User) |
Variables | |
UINT8 | UserProfileManagerVfrBin [] |
UINT8 | UserProfileManagerStrings [] |
EFI_USER_MANAGER_PROTOCOL * | mUserManager |
CREDENTIAL_PROVIDER_INFO * | mProviderInfo |
UINT8 | mProviderChoice |
UINT8 | mConncetLogical |
USER_INFO_ACCESS | mAccessInfo |
USER_INFO | mUserInfo |
USER_PROFILE_MANAGER_CALLBACK_INFO * | mCallbackInfo |
EFI_USER_PROFILE_HANDLE | mModifyUser |
Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.
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, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define USER_NAME_LENGTH 17 |
Referenced by CallAddUser(), GetUserName(), GetUserNameInput(), and ModifyUserName().
#define USER_PROFILE_MANAGER_SIGNATURE SIGNATURE_32 ('U', 'P', 'M', 'S') |
Referenced by UserProfileManagerInit().
VOID AddIdentityPolicyItem | ( | VOID | ) |
Update the mUserInfo.NewIdentityPolicy and UI when 'add option' is pressed.
Update the mUserInfo.NewIdentityPolicy, and UI when 'add option' is pressed.
References AddProviderToPolicy(), CREDENTIAL_PROVIDER_INFO::Count, mProviderChoice, mProviderInfo, mUserInfo, USER_INFO::NewIdentityPolicy, USER_INFO::NewIdentityPolicyLen, CREDENTIAL_PROVIDER_INFO::Provider, ProviderAlreadyInPolicy(), and ResolveIdentityPolicy().
Referenced by UserProfileManagerCallback().
VOID AddToForbidLoad | ( | IN UINT16 | DriverIndex | ) |
Add the specified device path by DriverIndex to the forbid device path list (mAccessInfo.LoadForbid).
[in] | DriverIndex | The index of driver saved in driver options. |
References USER_INFO_ACCESS::LoadForbid, USER_INFO_ACCESS::LoadForbidLen, mAccessInfo, and UINTN().
Referenced by UserProfileManagerCallback().
VOID AddUserToForm | ( | IN EFI_USER_PROFILE_HANDLE | User, | |
IN UINT16 | Index, | |||
IN VOID * | OpCodeHandle | |||
) |
Add a username item in form.
[in] | User | Points to the user profile whose username is added. |
[in] | Index | The index of the user in the user name list. |
[in] | OpCodeHandle | Points to container for dynamic created opcodes. |
[in] | User | Points to the user profile whose username is added. |
[in] | Index | The index of the user in the user name list |
[in] | OpCodeHandle | Points to container for dynamic created opcodes. |
References FORMID_USER_INFO, GetUserName(), KEY_DEL_USER, KEY_FIRST_FORM_MASK, and KEY_MODIFY_USER.
Referenced by SelectUserToDelete(), and SelectUserToModify().
VOID CallAddUser | ( | VOID | ) |
Add a new user profile into the user profile database.
References EFI_STATUS(), GetStringById(), GetUserNameInput(), mUserManager, SetAccessPolicy(), SetCreateDate(), SetIdentityPolicy(), SetUserName(), UINTN(), and USER_NAME_LENGTH.
Referenced by UserProfileManagerCallback().
VOID DeleteCredentialFromProviders | ( | IN UINT8 * | IdentityPolicy, | |
IN UINTN | IdentityPolicyLen, | |||
IN EFI_USER_PROFILE_HANDLE | User | |||
) |
Delete User's credental from all the providers that exist in User's identity policy.
[in] | IdentityPolicy | Point to User's identity policy. |
[in] | IdentityPolicyLen | The length of the identity policy. |
[in] | User | Points to user profile. |
References DeleteUserOnProvider(), and UINTN().
Referenced by DeleteUser(), and UpdateCredentialProvider().
VOID DeleteFromForbidLoad | ( | IN UINT16 | DriverIndex | ) |
Delete the specified device path by DriverIndex from the forbid device path list (mAccessInfo.LoadForbid).
[in] | DriverIndex | The index of driver in a forbidden device path list. |
[in] | DriverIndex | The index of driver in forbidden device path list. |
References USER_INFO_ACCESS::LoadForbid, USER_INFO_ACCESS::LoadForbidLen, mAccessInfo, and UINTN().
Referenced by UserProfileManagerCallback().
VOID DeleteUser | ( | IN UINT8 | UserIndex | ) |
Delete the user specified by UserIndex in user profile database.
[in] | UserIndex | The index of user in the user name list to be deleted. |
[in] | UserIndex | The index of user in the user name list to be deleted. |
References DeleteCredentialFromProviders(), EFI_STATUS(), FindInfoByType(), mUserManager, and UINTN().
Referenced by UserProfileManagerCallback().
VOID DisplayConnectForbid | ( | VOID | ) |
Display the forbid connect device path list.
Referenced by UserProfileManagerCallback().
VOID DisplayConnectPermit | ( | VOID | ) |
Display the permit connect device path.
Referenced by UserProfileManagerCallback().
VOID DisplayLoadForbid | ( | VOID | ) |
Display the forbid load device path list (mAccessInfo.LoadForbid).
References AddDevicePath(), FORMID_FORBID_LOAD_DP, gUserProfileManagerGuid, PWD_PROVIDER_CALLBACK_INFO::HiiHandle, KEY_LOAD_FORBID_MODIFY, KEY_MODIFY_AP_DP, KEY_MODIFY_USER, LABEL_END, LABLE_FORBID_LOAD_FUNC, USER_INFO_ACCESS::LoadForbid, USER_INFO_ACCESS::LoadForbidLen, mAccessInfo, mCallbackInfo, and UINTN().
Referenced by UserProfileManagerCallback().
VOID DisplayLoadPermit | ( | VOID | ) |
Display the permit load device path in the loadable device path list.
References AddDevicePath(), EFI_STATUS(), FORMID_PERMIT_LOAD_DP, gUserProfileManagerGuid, PWD_PROVIDER_CALLBACK_INFO::HiiHandle, IsLoadForbidden(), KEY_LOAD_PERMIT_MODIFY, KEY_MODIFY_AP_DP, KEY_MODIFY_USER, LABEL_END, LABEL_PERMIT_LOAD_FUNC, mCallbackInfo, and UINTN().
Referenced by UserProfileManagerCallback().
VOID ExpandMemory | ( | IN UINTN | ValidLen, | |
IN UINTN | ExpandLen | |||
) |
Expand access policy memory size.
[in] | ValidLen | The valid access policy length. |
[in] | ExpandLen | The length that is needed to expand. |
References USER_INFO::AccessPolicy, USER_INFO::AccessPolicyLen, mUserInfo, and UINTN().
Referenced by SaveAccessPolicy().
EFI_STATUS FindInfoByType | ( | IN EFI_USER_PROFILE_HANDLE | User, | |
IN UINT8 | InfoType, | |||
OUT EFI_USER_INFO_HANDLE * | UserInfo | |||
) |
Find the specified info in User profile by the InfoType.
[in] | User | Handle of the user whose information will be searched. |
[in] | InfoType | The user information type to find. |
[out] | UserInfo | Points to user information handle found. |
EFI_SUCCESS | Find the user information successfully. | |
Others | Fail to find the user information. |
References EFI_STATUS(), mUserManager, TRUE, and UINTN().
Referenced by DeleteUser(), ModifyUserName(), SaveAccessPolicy(), and SaveIdentityPolicy().
EFI_STATUS GetAccessRight | ( | OUT UINT32 * | AccessRight | ) |
Get current user's access rights.
[out] | AccessRight | Points to the buffer used for user's access rights. |
EFI_SUCCESS | Get current user access rights successfully. | |
others | Fail to get current user access rights. |
[out] | AccessRight | Points to the buffer used for user's access right. |
EFI_SUCCESS | Get current user access right successfully. | |
others | Fail to get current user access right. |
References EFI_STATUS(), mUserManager, TRUE, and UINTN().
Referenced by ModifyUserInfo(), SelectUserToModify(), and UserProfileManagerCallback().
CHAR16* GetStringById | ( | IN EFI_STRING_ID | Id | ) |
Get string by string id from HII Interface.
[in] | Id | String ID to get the string from. |
CHAR16 | * String from ID. | |
NULL | If error occurs. |
References USER_PROFILE_MANAGER_CALLBACK_INFO::HiiHandle, USB_PROVIDER_CALLBACK_INFO::HiiHandle, and PWD_PROVIDER_CALLBACK_INFO::HiiHandle.
Referenced by CallAddUser(), CredentialDriverCallback(), CredentialEnroll(), CredentialGetNextInfo(), CredentialUser(), GetPassword(), and UserProfileManagerCallback().
EFI_STATUS GetUserNameInput | ( | IN OUT UINTN * | UserNameLen, | |
OUT CHAR16 * | UserName | |||
) |
Get user name from the popup windows.
[in,out] | UserNameLen | On entry, point to the buffer lengh of UserName. On exit, point to the input user name length. |
[out] | UserName | The buffer to hold the input user name. |
EFI_ABORTED | It is given up by pressing 'ESC' key. | |
EFI_NOT_READY | Not a valid input at all. | |
EFI_SUCCESS | Get a user name successfully. |
[in,out] | UserNameLen | On entry, point to UserName buffer lengh, in bytes. On exit, point to input user name length, in bytes. |
[out] | UserName | The buffer to hold the input user name. |
EFI_ABORTED | It is given up by pressing 'ESC' key. | |
EFI_NOT_READY | Not a valid input at all. | |
EFI_SUCCESS | Get a user name successfully. |
References TRUE, UINTN(), and USER_NAME_LENGTH.
Referenced by CallAddUser(), and ModifyUserName().
VOID ModidyAccessPolicy | ( | VOID | ) |
Display modify user access policy form
In this form, access right, access setu,p and access boot order are dynamically added. Load devicepath and connect devicepath are displayed too.
Display modify user access policy form.
In this form, access right, access setup and access boot order are dynamically added. Load devicepath and connect devicepath are displayed too.
References ACCESS_SETUP_ADMIN, ACCESS_SETUP_NORMAL, ACCESS_SETUP_RESTRICTED, USER_INFO_ACCESS::AccessBootOrder, USER_INFO_ACCESS::AccessRight, USER_INFO_ACCESS::AccessSetup, FORMID_MODIFY_AP, gUserProfileManagerGuid, PWD_PROVIDER_CALLBACK_INFO::HiiHandle, KEY_MODIFY_AP, KEY_MODIFY_BOOT, KEY_MODIFY_RIGHT, KEY_MODIFY_SETUP, KEY_MODIFY_USER, KEY_SELECT_USER, LABEL_AP_MOD_FUNC, LABEL_END, mAccessInfo, mCallbackInfo, and ResolveAccessPolicy().
Referenced by UserProfileManagerCallback().
VOID ModifyIdentityPolicy | ( | VOID | ) |
Display the form of modifying user identity policy.
Display the form of the modifying user identity policy.
References CREDENTIAL_PROVIDER_INFO::Count, FORMID_MODIFY_IP, gUserProfileManagerGuid, PWD_PROVIDER_CALLBACK_INFO::HiiHandle, USER_INFO::IdentityPolicy, USER_INFO::IdentityPolicyLen, KEY_MODIFY_CONN, KEY_MODIFY_IP, KEY_MODIFY_PROV, KEY_MODIFY_USER, KEY_SELECT_USER, LABEL_END, LABEL_IP_MOD_FUNC, mCallbackInfo, mConncetLogical, mProviderChoice, mProviderInfo, mUserInfo, USER_INFO::NewIdentityPolicy, USER_INFO::NewIdentityPolicyLen, USER_INFO::NewIdentityPolicyModified, CREDENTIAL_PROVIDER_INFO::Provider, ResolveIdentityPolicy(), and UINTN().
Referenced by UserProfileManagerCallback().
VOID ModifyUserInfo | ( | IN UINT8 | UserIndex | ) |
Display modify user information form
In this form, username, create Date, usage date, usage count, identity policy, and access policy are displayed.
[in] | UserIndex | The index of the user in display list to modify. |
This form displays, username, create Date, usage date, usage count, identity policy, and access policy.
[in] | UserIndex | The index of the user in display list to modify. |
References USER_INFO::CreateDate, USER_INFO::CreateDateExist, EFI_STATUS(), FORMID_MODIFY_AP, FORMID_MODIFY_IP, FORMID_USER_INFO, GetAccessRight(), GetAllUserInfo(), gUserProfileManagerGuid, PWD_PROVIDER_CALLBACK_INFO::HiiHandle, USER_INFO::IdentityPolicy, USER_INFO::IdentityPolicyLen, KEY_MODIFY_AP, KEY_MODIFY_IP, KEY_MODIFY_USER, KEY_SELECT_USER, LABEL_END, LABEL_USER_INFO_FUNC, mCallbackInfo, mModifyUser, mUserInfo, mUserManager, ResolveCount(), ResolveDate(), ResolveIdentityPolicy(), USER_INFO::UsageCount, USER_INFO::UsageDate, USER_INFO::UsageDateExist, and USER_INFO::UserName.
VOID ModifyUserName | ( | VOID | ) |
Get the username from user input and update username string in Hii database with it.
Get the username from user input, and update username string in the Hii database with it.
References EFI_STATUS(), FindInfoByType(), GetUserNameInput(), PWD_PROVIDER_CALLBACK_INFO::HiiHandle, mCallbackInfo, mModifyUser, mUserInfo, mUserManager, UINTN(), USER_NAME_LENGTH, and USER_INFO::UserName.
Referenced by UserProfileManagerCallback().
VOID ResolveIdentityPolicy | ( | IN UINT8 * | Ip, | |
IN UINTN | IpLen, | |||
IN EFI_STRING_ID | IpStringId | |||
) |
Convert the identity policy to a unicode string and update the Hii database IpStringId string with it.
[in] | Ip | Points to identity policy. |
[in] | IpLen | The identity policy length. |
[in] | IpStringId | String ID in the HII database to be replaced. |
References AddStr(), CREDENTIAL_PROVIDER_INFO::Count, PWD_PROVIDER_CALLBACK_INFO::HiiHandle, mCallbackInfo, mProviderInfo, CREDENTIAL_PROVIDER_INFO::Provider, and UINTN().
Referenced by AddIdentityPolicyItem(), ModifyIdentityPolicy(), ModifyUserInfo(), and SaveIdentityPolicy().
VOID SaveAccessPolicy | ( | VOID | ) |
Collect all the access policy data to mUserInfo.AccessPolicy, and save it to user profile.
References ACCESS_SETUP_ADMIN, ACCESS_SETUP_NORMAL, ACCESS_SETUP_RESTRICTED, USER_INFO_ACCESS::AccessBootOrder, USER_INFO::AccessPolicy, USER_INFO::AccessPolicyLen, USER_INFO::AccessPolicyModified, USER_INFO_ACCESS::AccessRight, USER_INFO_ACCESS::AccessSetup, USER_INFO_ACCESS::ConnectForbid, USER_INFO_ACCESS::ConnectForbidLen, USER_INFO_ACCESS::ConnectPermit, USER_INFO_ACCESS::ConnectPermitLen, EFI_STATUS(), ExpandMemory(), FindInfoByType(), USER_INFO_ACCESS::LoadForbid, USER_INFO_ACCESS::LoadForbidLen, USER_INFO_ACCESS::LoadPermit, USER_INFO_ACCESS::LoadPermitLen, mAccessInfo, mModifyUser, mUserInfo, mUserManager, TRUE, and UINTN().
Referenced by UserProfileManagerCallback().
VOID SaveIdentityPolicy | ( | VOID | ) |
Save the identity policy and update UI with it.
This funciton 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.
References CheckNewIdentityPolicy(), EFI_STATUS(), FindInfoByType(), USER_INFO::IdentityPolicy, USER_INFO::IdentityPolicyLen, mModifyUser, mUserInfo, mUserManager, USER_INFO::NewIdentityPolicy, USER_INFO::NewIdentityPolicyLen, USER_INFO::NewIdentityPolicyModified, ResolveIdentityPolicy(), and UpdateCredentialProvider().
Referenced by UserProfileManagerCallback().
VOID SelectUserToDelete | ( | VOID | ) |
Display user select form, cab select a user to delete.
References AddUserToForm(), EFI_STATUS(), FORMID_DEL_USER, gUserProfileManagerGuid, PWD_PROVIDER_CALLBACK_INFO::HiiHandle, KEY_DEL_USER, KEY_SELECT_USER, LABEL_END, LABEL_USER_DEL_FUNC, mCallbackInfo, mUserManager, and TRUE.
Referenced by UserProfileManagerCallback().
VOID SelectUserToModify | ( | VOID | ) |
Display user select form; can select a user to modify.
Display user select form, cab select a user to modify.
References AddUserToForm(), EFI_STATUS(), FORMID_MODIFY_USER, GetAccessRight(), gUserProfileManagerGuid, PWD_PROVIDER_CALLBACK_INFO::HiiHandle, KEY_MODIFY_USER, KEY_SELECT_USER, LABEL_END, LABEL_USER_MOD_FUNC, mCallbackInfo, mUserManager, and TRUE.
Referenced by UserProfileManagerCallback().
UINT8 mConncetLogical |
Referenced by AddProviderToPolicy(), GetAllUserInfo(), ModifyIdentityPolicy(), and UserProfileManagerCallback().
EFI_USER_PROFILE_HANDLE mModifyUser |
Referenced by GetAllUserInfo(), ModifyUserInfo(), ModifyUserName(), SaveAccessPolicy(), SaveIdentityPolicy(), and UpdateCredentialProvider().
UINT8 mProviderChoice |
Referenced by AddIdentityPolicyItem(), GetAllUserInfo(), ModifyIdentityPolicy(), and UserProfileManagerCallback().
Referenced by AddIdentityPolicyItem(), AddProviderToPolicy(), DeleteProviderFromPolicy(), ExpandMemory(), GetAllUserInfo(), ModifyIdentityPolicy(), ModifyUserInfo(), ModifyUserName(), ProviderAlreadyInPolicy(), ResolveAccessPolicy(), SaveAccessPolicy(), SaveIdentityPolicy(), and UpdateCredentialProvider().
EFI_USER_MANAGER_PROTOCOL* mUserManager |
Referenced by CallAddUser(), DeleteUser(), DxeDeferImageLoadHandler(), FindInfoByType(), FindUserManagerProtocol(), GetAccessRight(), GetAllUserInfo(), GetUserName(), ModifyUserInfo(), ModifyUserName(), SaveAccessPolicy(), SaveIdentityPolicy(), SelectUserToDelete(), SelectUserToModify(), SetAccessPolicy(), SetCreateDate(), SetIdentityPolicy(), SetUserName(), UserProfileManagerCallback(), and UserProfileManagerInit().
UINT8 UserProfileManagerStrings[] |
Referenced by UserProfileManagerInit().
UINT8 UserProfileManagerVfrBin[] |
Referenced by UserProfileManagerInit().