SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.h File Reference


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_INFOmProviderInfo
UINT8 mProviderChoice
UINT8 mConncetLogical
USER_INFO_ACCESS mAccessInfo
USER_INFO mUserInfo
USER_PROFILE_MANAGER_CALLBACK_INFOmCallbackInfo
EFI_USER_PROFILE_HANDLE mModifyUser

Detailed Description

The header file for user profile manager driver.

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 Documentation

#define USER_NAME_LENGTH   17

#define USER_PROFILE_MANAGER_SIGNATURE   SIGNATURE_32 ('U', 'P', 'M', 'S')

Referenced by UserProfileManagerInit().


Function Documentation

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).

Parameters:
[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.

Parameters:
[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.
Add a username item in form.

Parameters:
[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   ) 

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.

Parameters:
[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).

Parameters:
[in] DriverIndex The index of driver in a forbidden device path list.
Delete the specified device path by DriverIndex from the forbid device path list (mAccessInfo.LoadForbid).

Parameters:
[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.

Parameters:
[in] UserIndex The index of user in the user name list to be deleted.
Delete the user specified by UserIndex in user profile database.

Parameters:
[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   ) 

VOID DisplayLoadPermit ( VOID   ) 

VOID ExpandMemory ( IN UINTN  ValidLen,
IN UINTN  ExpandLen 
)

Expand access policy memory size.

Parameters:
[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.

Parameters:
[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.
Return values:
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.

Parameters:
[out] AccessRight Points to the buffer used for user's access rights.
Return values:
EFI_SUCCESS Get current user access rights successfully.
others Fail to get current user access rights.
Get current user's access right.

Parameters:
[out] AccessRight Points to the buffer used for user's access right.
Return values:
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.

Parameters:
[in] Id String ID to get the string from.
Return values:
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.

Parameters:
[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.
Return values:
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.
Get user name from the popup windows.

Parameters:
[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.
Return values:
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   ) 

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.

Parameters:
[in] UserIndex The index of the user in display list to modify.
Display modify user information form.

This form displays, username, create Date, usage date, usage count, identity policy, and access policy.

Parameters:
[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.

Parameters:
[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   ) 

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   ) 

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().


Variable Documentation

EFI_USER_PROFILE_HANDLE mModifyUser

EFI_USER_MANAGER_PROTOCOL* mUserManager

Referenced by UserProfileManagerInit().

Referenced by UserProfileManagerInit().


Generated on Thu Sep 24 23:44:25 2015 for SecurityPkg[ALL] by  doxygen 1.5.7.1