SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.h File Reference


Data Structures

struct  CREDENTIAL_PROVIDER_INFO
struct  USER_PROFILE_ENTRY
struct  USER_PROFILE_DB
struct  USER_MANAGER_CALLBACK_INFO
struct  HII_VENDOR_DEVICE_PATH

Defines

#define USER_NUMBER_INC   32
#define DEFAULT_PROFILE_SIZE   512
#define INFO_PAYLOAD_SIZE   64
#define USER_MANAGER_SIGNATURE   SIGNATURE_32 ('U', 'I', 'M', 'S')

Functions

VOID LoadDeferredImageInit (IN EFI_HANDLE ImageHandle)
EFI_STATUS EFIAPI UserProfileCreate (IN CONST EFI_USER_MANAGER_PROTOCOL *This, OUT EFI_USER_PROFILE_HANDLE *User)
EFI_STATUS EFIAPI UserProfileDelete (IN CONST EFI_USER_MANAGER_PROTOCOL *This, IN EFI_USER_PROFILE_HANDLE User)
EFI_STATUS EFIAPI UserProfileGetNext (IN CONST EFI_USER_MANAGER_PROTOCOL *This, IN OUT EFI_USER_PROFILE_HANDLE *User)
EFI_STATUS EFIAPI UserProfileCurrent (IN CONST EFI_USER_MANAGER_PROTOCOL *This, OUT EFI_USER_PROFILE_HANDLE *CurrentUser)
EFI_STATUS EFIAPI UserProfileIdentify (IN CONST EFI_USER_MANAGER_PROTOCOL *This, OUT EFI_USER_PROFILE_HANDLE *User)
EFI_STATUS EFIAPI UserProfileFind (IN CONST EFI_USER_MANAGER_PROTOCOL *This, IN OUT EFI_USER_PROFILE_HANDLE *User, IN OUT EFI_USER_INFO_HANDLE *UserInfo, IN CONST EFI_USER_INFO *Info, IN UINTN InfoSize)
EFI_STATUS EFIAPI UserProfileGetInfo (IN CONST EFI_USER_MANAGER_PROTOCOL *This, IN EFI_USER_PROFILE_HANDLE User, IN EFI_USER_INFO_HANDLE UserInfo, OUT EFI_USER_INFO *Info, IN OUT UINTN *InfoSize)
EFI_STATUS EFIAPI UserProfileSetInfo (IN CONST EFI_USER_MANAGER_PROTOCOL *This, IN EFI_USER_PROFILE_HANDLE User, IN OUT EFI_USER_INFO_HANDLE *UserInfo, IN CONST EFI_USER_INFO *Info, IN UINTN InfoSize)
EFI_STATUS EFIAPI UserProfileNotify (IN CONST EFI_USER_MANAGER_PROTOCOL *This, IN EFI_HANDLE Changed)
EFI_STATUS EFIAPI UserProfileDeleteInfo (IN CONST EFI_USER_MANAGER_PROTOCOL *This, IN EFI_USER_PROFILE_HANDLE User, IN EFI_USER_INFO_HANDLE UserInfo)
EFI_STATUS EFIAPI UserProfileGetNextInfo (IN CONST EFI_USER_MANAGER_PROTOCOL *This, IN EFI_USER_PROFILE_HANDLE User, IN OUT EFI_USER_INFO_HANDLE *UserInfo)

Variables

UINT8 UserIdentifyManagerVfrBin []
UINT8 UserIdentifyManagerStrings []

Detailed Description

The header file for User identify Manager driver.

Copyright (c) 2009 - 2011, 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 DEFAULT_PROFILE_SIZE   512

Referenced by InitUserProfileDb().

#define INFO_PAYLOAD_SIZE   64

Referenced by AddDefaultUserProfile().

#define USER_MANAGER_SIGNATURE   SIGNATURE_32 ('U', 'I', 'M', 'S')

Referenced by InitFormBrowser().

#define USER_NUMBER_INC   32


Function Documentation

VOID LoadDeferredImageInit ( IN EFI_HANDLE  ImageHandle  ) 

Register an event notification function for the user profile changed.

Parameters:
[in] ImageHandle Image handle this driver.
Register an event notification function for user profile changed.

Parameters:
[in] ImageHandle Image handle this driver.

References EFI_STATUS(), LoadDeferredImage(), and mDeferredImageHandle.

Referenced by UserIdentifyManagerInit().

EFI_STATUS EFIAPI UserProfileCreate ( IN CONST EFI_USER_MANAGER_PROTOCOL *  This,
OUT EFI_USER_PROFILE_HANDLE *  User 
)

This function creates a new user profile with only a new user identifier attached and returns its handle. The user profile is non-volatile, but the handle User can change across reboots.

Parameters:
[in] This Protocol EFI_USER_MANAGER_PROTOCOL instance pointer.
[out] User Handle of a new user profile.
Return values:
EFI_SUCCESS User profile was successfully created.
EFI_ACCESS_DENIED Current user does not have sufficient permissions to create a user profile.
EFI_UNSUPPORTED Creation of new user profiles is not supported.
EFI_INVALID_PARAMETER User is NULL.
Create a new user profile.

This function creates a new user profile with only a new user identifier attached and returns its handle. The user profile is non-volatile, but the handle User can change across reboots.

Parameters:
[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
[out] User On return, points to the new user profile handle. The user profile handle is unique only during this boot.
Return values:
EFI_SUCCESS User profile was successfully created.
EFI_ACCESS_DENIED Current user does not have sufficient permissions to create a user profile.
EFI_UNSUPPORTED Creation of new user profiles is not supported.
EFI_INVALID_PARAMETER The User parameter is NULL.

References CheckCurrentUserAccessRight(), CreateUserProfile(), and EFI_STATUS().

EFI_STATUS EFIAPI UserProfileCurrent ( IN CONST EFI_USER_MANAGER_PROTOCOL *  This,
OUT EFI_USER_PROFILE_HANDLE *  CurrentUser 
)

This function returns the current user profile handle.

Parameters:
[in] This Protocol EFI_USER_MANAGER_PROTOCOL instance pointer.
[out] CurrentUser User profile handle.
Return values:
EFI_SUCCESS Current user profile handle returned successfully.
EFI_INVALID_PARAMETER CurrentUser is NULL.
Return the current user profile handle.

Parameters:
[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
[out] CurrentUser On return, points to the current user profile handle.
Return values:
EFI_SUCCESS Current user profile handle returned successfully.
EFI_INVALID_PARAMETER The CurrentUser parameter is NULL.

References mCurrentUser.

EFI_STATUS EFIAPI UserProfileDelete ( IN CONST EFI_USER_MANAGER_PROTOCOL *  This,
IN EFI_USER_PROFILE_HANDLE  User 
)

Delete an existing user profile.

Parameters:
This Protocol EFI_USER_MANAGER_PROTOCOL instance pointer.
User User profile handle.
Return values:
EFI_SUCCESS User profile was successfully deleted.
EFI_ACCESS_DENIED Current user does not have sufficient permissions to delete a user profile or there is only one user profile.
EFI_UNSUPPORTED Deletion of new user profiles is not supported.
EFI_INVALID_PARAMETER User does not refer to a valid user profile.
Delete an existing user profile.

Parameters:
[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
[in] User User profile handle.
Return values:
EFI_SUCCESS User profile was successfully deleted.
EFI_ACCESS_DENIED Current user does not have sufficient permissions to delete a user profile or there is only one user profile.
EFI_UNSUPPORTED Deletion of new user profiles is not supported.
EFI_INVALID_PARAMETER User does not refer to a valid user profile.

References CheckCurrentUserAccessRight(), DelUserProfile(), and EFI_STATUS().

EFI_STATUS EFIAPI UserProfileDeleteInfo ( IN CONST EFI_USER_MANAGER_PROTOCOL *  This,
IN EFI_USER_PROFILE_HANDLE  User,
IN EFI_USER_INFO_HANDLE  UserInfo 
)

Delete the user information attached to the user profile specified by the UserInfo.

Parameters:
This Protocol EFI_USER_MANAGER_PROTOCOL instance pointer.
User Handle of the user whose profile will be retrieved.
UserInfo Handle of the user information data record.
Return values:
EFI_SUCCESS User information deleted successfully.
EFI_ACCESS_DENIED The current user does not have permission to delete this user in-formation.
EFI_NOT_FOUND User information record UserInfo does not exist in the user pro-file.
Delete user information.

Delete the user information attached to the user profile specified by the UserInfo.

Parameters:
[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
[in] User Handle of the user whose information will be deleted.
[in] UserInfo Handle of the user information to remove.
Return values:
EFI_SUCCESS User information deleted successfully.
EFI_NOT_FOUND User information record UserInfo does not exist in the user profile.
EFI_ACCESS_DENIED The current user does not have permission to delete this user information.

References CheckCurrentUserAccessRight(), DelUserInfo(), EFI_STATUS(), mCurrentUser, and TRUE.

EFI_STATUS EFIAPI UserProfileFind ( IN CONST EFI_USER_MANAGER_PROTOCOL *  This,
IN OUT EFI_USER_PROFILE_HANDLE *  User,
IN OUT EFI_USER_INFO_HANDLE *  UserInfo,
IN CONST EFI_USER_INFO *  Info,
IN UINTN  InfoSize 
)

Find a user using a user information record.

This function searches all user profiles for the specified user information record. The search starts with the user information record handle following UserInfo and continues until either the information is found or there are no more user profiles. A match occurs when the Info.InfoType field matches the user information record type and the user information record data matches the portion of Info passed the EFI_USER_INFO header.

Parameters:
[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
[in,out] User On entry, points to the previously returned user profile handle, or NULL to start searching with the first user profile. On return, points to the user profile handle, or NULL if not found.
[in,out] UserInfo On entry, points to the previously returned user information handle, or NULL to start searching with the first. On return, points to the user information handle of the user information record, or NULL if not found. Can be NULL, in which case only one user information record per user can be returned.
[in] Info Points to the buffer containing the user information to be compared to the user information record. If NULL, then only the user information record type is compared. If InfoSize is 0, then the user information record must be empty.
[in] InfoSize The size of Info, in bytes.
Return values:
EFI_SUCCESS User information was found. User points to the user profile handle, and UserInfo points to the user information handle.
EFI_NOT_FOUND User information was not found. User points to NULL and UserInfo points to NULL.
Find a user using a user information record.

This function searches all user profiles for the specified user information record. The search starts with the user information record handle following UserInfo and continues until either the information is found or there are no more user profiles. A match occurs when the Info.InfoType field matches the user information record type and the user information record data matches the portion of Info.

Parameters:
[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
[in,out] User On entry, points to the previously returned user profile handle, or NULL to start searching with the first user profile. On return, points to the user profile handle, or NULL if not found.
[in,out] UserInfo On entry, points to the previously returned user information handle, or NULL to start searching with the first. On return, points to the user information handle of the user information record, or NULL if not found. Can be NULL, in which case only one user information record per user can be returned.
[in] Info Points to the buffer containing the user information to be compared to the user information record. If the user information record data is empty, then only the user information record type is compared. If InfoSize is 0, then the user information record must be empty.
[in] InfoSize The size of Info, in bytes.
Return values:
EFI_SUCCESS User information was found. User points to the user profile handle, and UserInfo points to the user information handle.
EFI_NOT_FOUND User information was not found. User points to NULL, and UserInfo points to NULL.
EFI_INVALID_PARAMETER User is NULL. Or Info is NULL.

References EFI_STATUS(), FindUserProfileByInfo(), and UINTN().

EFI_STATUS EFIAPI UserProfileGetInfo ( IN CONST EFI_USER_MANAGER_PROTOCOL *  This,
IN EFI_USER_PROFILE_HANDLE  User,
IN EFI_USER_INFO_HANDLE  UserInfo,
OUT EFI_USER_INFO *  Info,
IN OUT UINTN *  InfoSize 
)

This function returns user information.

Parameters:
This Protocol EFI_USER_MANAGER_PROTOCOL instance pointer.
User Handle of the user whose profile will be retrieved.
UserInfo Handle of the user information data record.
Info On entry, points to a buffer of at least InfoSize bytes. On exit, holds the user information.
InfoSize On entry, points to the size of Info. On return, points to the size of the user information.
Return values:
EFI_SUCCESS Information returned successfully.
EFI_ACCESS_DENIED The information about the specified user cannot be accessed by the current user. EFI_BUFFER_TOO_SMALL- The number of bytes specified by *InfoSize is too small to hold the returned data.
Return information attached to the user.

This function returns user information. The format of the information is described in User Information. The function may return EFI_ACCESS_DENIED if the information is marked private and the handle specified by User is not the current user profile. The function may return EFI_ACCESS_DENIED if the information is marked protected and the information is associated with a credential provider for which the user has not been authenticated.

Parameters:
[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
[in] User Handle of the user whose profile will be retrieved.
[in] UserInfo Handle of the user information data record.
[out] Info On entry, points to a buffer of at least *InfoSize bytes. On exit, holds the user information. If the buffer is too small to hold the information, then EFI_BUFFER_TOO_SMALL is returned and InfoSize is updated to contain the number of bytes actually required.
[in,out] InfoSize On entry, points to the size of Info. On return, points to the size of the user information.
Return values:
EFI_SUCCESS Information returned successfully.
EFI_ACCESS_DENIED The information about the specified user cannot be accessed by the current user.
EFI_BUFFER_TOO_SMALL The number of bytes specified by *InfoSize is too small to hold the returned data. The actual size required is returned in *InfoSize.
EFI_NOT_FOUND User does not refer to a valid user profile or UserInfo does not refer to a valid user info handle.
EFI_INVALID_PARAMETER Info is NULL or InfoSize is NULL.

References EFI_STATUS(), GetUserInfo(), and TRUE.

EFI_STATUS EFIAPI UserProfileGetNext ( IN CONST EFI_USER_MANAGER_PROTOCOL *  This,
IN OUT EFI_USER_PROFILE_HANDLE *  User 
)

Get next user profile from the user profile database.

Parameters:
[in] This Protocol EFI_USER_MANAGER_PROTOCOL instance pointer.
[in,out] User User profile handle.
Return values:
EFI_SUCCESS Next enrolled user profile successfully returned.
EFI_INVALID_PARAMETER User is NULL.
Enumerate all of the enrolled users on the platform.

This function returns the next enrolled user profile. To retrieve the first user profile handle, point User at a NULL. Each subsequent call will retrieve another user profile handle until there are no more, at which point User will point to NULL.

Parameters:
[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
[in,out] User On entry, points to the previous user profile handle or NULL to start enumeration. On exit, points to the next user profile handle or NULL if there are no more user profiles.
Return values:
EFI_SUCCESS Next enrolled user profile successfully returned.
EFI_ACCESS_DENIED Next enrolled user profile was not successfully returned.
EFI_INVALID_PARAMETER The User parameter is NULL.

References EFI_STATUS(), FindUserProfile(), and TRUE.

EFI_STATUS EFIAPI UserProfileGetNextInfo ( IN CONST EFI_USER_MANAGER_PROTOCOL *  This,
IN EFI_USER_PROFILE_HANDLE  User,
IN OUT EFI_USER_INFO_HANDLE *  UserInfo 
)

This function returns the next user information record.

Parameters:
This Protocol EFI_USER_MANAGER_PROTOCOL instance pointer.
User Handle of the user whose profile will be retrieved.
UserInfo Handle of the user information data record.
Return values:
EFI_SUCCESS User information returned.
EFI_NOT_FOUND No more user information found.
Enumerate user information of all the enrolled users on the platform.

This function returns the next user information record. To retrieve the first user information record handle, point UserInfo at a NULL. Each subsequent call will retrieve another user information record handle until there are no more, at which point UserInfo will point to NULL.

Parameters:
[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
[in] User Handle of the user whose information will be deleted.
[in,out] UserInfo Handle of the user information to remove.
Return values:
EFI_SUCCESS User information returned.
EFI_NOT_FOUND No more user information found.
EFI_INVALID_PARAMETER UserInfo is NULL.

References FindUserInfo(), and TRUE.

EFI_STATUS EFIAPI UserProfileIdentify ( IN CONST EFI_USER_MANAGER_PROTOCOL *  This,
OUT EFI_USER_PROFILE_HANDLE *  User 
)

Identify the user and, if authenticated, returns the user handle and changes the current user profile.

Parameters:
This Protocol EFI_USER_MANAGER_PROTOCOL instance pointer.
CurrentUser User profile handle.
Return values:
EFI_SUCCESS User was successfully identified.
EFI_INVALID_PARAMETER User is NULL.
EFI_ACCESS_DENIED User was not successfully identified.
Identify a user.

Identify the user and, if authenticated, returns the user handle and changes the current user profile. All user information marked as private in a previously selected profile is no longer available for inspection. Whenever the current user profile is changed then the an event with the GUID EFI_EVENT_GROUP_USER_PROFILE_CHANGED is signaled.

Parameters:
[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
[out] User On return, points to the user profile handle for the current user profile.
Return values:
EFI_SUCCESS User was successfully identified.
EFI_ACCESS_DENIED User was not successfully identified.
EFI_INVALID_PARAMETER The User parameter is NULL.

References EFI_STATUS(), IdentifyUser(), mCurrentUser, PublishUserTable(), and SignalEventUserProfileChanged().

EFI_STATUS EFIAPI UserProfileNotify ( IN CONST EFI_USER_MANAGER_PROTOCOL *  This,
IN EFI_HANDLE  Changed 
)

This function allows the credential provider to notify the User Identity Manager when user status has changed while deselected.

Parameters:
This Protocol EFI_USER_MANAGER_PROTOCOL instance pointer.
Changed Points to the instance of the EFI_USER_CREDENTIAL_PROTOCOL where the user has changed.
Return values:
EFI_SUCCESS The User Identity Manager has handled the notification.
EFI_NOT_READY The function was called while the specified credential provider was not selected.
EFI_UNSUPPORTED The User Identity Manager doesn't support asynchronous notifications.
Called by credential provider to notify of information change.

This function allows the credential provider to notify the User Identity Manager when user status has changed. If the User Identity Manager doesn't support asynchronous changes in credentials, then this function should return EFI_UNSUPPORTED. If current user does not exist, and the credential provider can identify a user, then make the user to be current user and signal the EFI_EVENT_GROUP_USER_PROFILE_CHANGED event. If current user already exists, and the credential provider can identify another user, then switch current user to the newly identified user, and signal the EFI_EVENT_GROUP_USER_PROFILE_CHANGED event. If current user was identified by this credential provider and now the credential provider cannot identify current user, then logout current user and signal the EFI_EVENT_GROUP_USER_PROFILE_CHANGED event.

Parameters:
[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
[in] Changed Handle on which is installed an instance of the EFI_USER_CREDENTIAL2_PROTOCOL where the user has changed.
Return values:
EFI_SUCCESS The User Identity Manager has handled the notification.
EFI_NOT_READY The function was called while the specified credential provider was not selected.
EFI_UNSUPPORTED The User Identity Manager doesn't support asynchronous notifications.

EFI_STATUS EFIAPI UserProfileSetInfo ( IN CONST EFI_USER_MANAGER_PROTOCOL *  This,
IN EFI_USER_PROFILE_HANDLE  User,
IN OUT EFI_USER_INFO_HANDLE *  UserInfo,
IN CONST EFI_USER_INFO *  Info,
IN UINTN  InfoSize 
)

This function changes user information.

Parameters:
This Protocol EFI_USER_MANAGER_PROTOCOL instance pointer.
User Handle of the user whose profile will be retrieved.
UserInfo Handle of the user information data record.
Info Points to the user information.
InfoSize The size of Info, in bytes.
Return values:
EFI_SUCCESS User profile information was successfully changed/added.
EFI_ACCESS_DENIED The record is exclusive.
EFI_SECURITY_VIOLATION The current user does not have permission to change the specified user profile or user information record.
Add or update user information.

This function changes user information. If NULL is pointed to by UserInfo, then a new user information record is created and its handle is returned in UserInfo. Otherwise, the existing one is replaced. If EFI_USER_INFO_IDENITTY_POLICY_RECORD is changed, it is the caller's responsibility to keep it to be synced with the information on credential providers. If EFI_USER_INFO_EXCLUSIVE is specified in Info and a user information record of the same type already exists in the user profile, then EFI_ACCESS_DENIED will be returned and UserInfo will point to the handle of the existing record.

Parameters:
[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
[in] User Handle of the user whose profile will be retrieved.
[in,out] UserInfo Handle of the user information data record.
[in] Info On entry, points to a buffer of at least *InfoSize bytes. On exit, holds the user information. If the buffer is too small to hold the information, then EFI_BUFFER_TOO_SMALL is returned and InfoSize is updated to contain the number of bytes actually required.
[in] InfoSize On entry, points to the size of Info. On return, points to the size of the user information.
Return values:
EFI_SUCCESS Information returned successfully.
EFI_ACCESS_DENIED The record is exclusive.
EFI_SECURITY_VIOLATION The current user does not have permission to change the specified user profile or user information record.
EFI_NOT_FOUND User does not refer to a valid user profile or UserInfo does not refer to a valid user info handle.
EFI_INVALID_PARAMETER UserInfo is NULL or Info is NULL.

References CheckCurrentUserAccessRight(), EFI_STATUS(), mCurrentUser, and ModifyUserInfo().


Variable Documentation

Referenced by InitFormBrowser().

Referenced by InitFormBrowser().


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