EFI USER MANAGER PROTOCOL

From PhoenixWiki

Jump to: navigation, search

Reports information about a user.

Contents

GUID

#define EFI_USER_MANAGER_PROTOCOL_GUID \
  { 0x6fd5b00c, 0xd426, 0x4283, \
  { 0x98, 0x87, 0x6c, 0xf5, 0xcf, 0x1c, 0xb1, 0xfe } }

Prototype

typedef struct _EFI_USER_MANAGER_PROTOCOL {
  EFI_USER_PROFILE_CREATE        Create;
  EFI_USER_PROFILE_DELETE        Delete;
  EFI_USER_PROFILE_GET_NEXT      GetNext;
  EFI_USER_PROFILE_CURRENT       Current;
  EFI_USER_PROFILE_IDENTIFY      Identify;
  EFI_USER_PROFILE_FIND          Find;
  EFI_USER_PROFILE_NOTIFY        Notify;
  EFI_USER_PROFILE_GET_INFO      GetInfo;
  EFI_USER_PROFILE_SET_INFO      SetInfo;
  EFI_USER_PROFILE_DELETE_INFO   DeleteInfo;
  EFI_USER_PROFILE_GET_NEXT_INFO GetNextInfo;
} EFI_USER_MANAGER_PROTOCOL;

Members

Member Description
Create Create a new user profile.
Delete Delete an existing user profile.
GetNext Cycle through all user profiles.
Current Return the current user profile.
Identify Identify a user and set the current user profile using credentials.
Find Find a user by a piece of user information.
Notify Notify the user manager driver that credential information has changed.
GetInfo Return information from a user profile.
SetInfo Change information in a user profile.
DeleteInfo Delete information from a user profile.
GetNextInfo Cycle through all information from a user profile.

Description
This protocol manages user profiles.

Create()

Create a new user profile.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_USER_PROFILE_CREATE) (
  IN  CONST EFI_USER_MANAGER_PROTOCOL *This,
  OUT EFI_USER_PROFILE_HANDLE         *User
  );

Parameters

Parameter Description
This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
User On return, points to the new user profile handle. The user profile handle is unique only during this boot.

Description
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. If the current user profile does not permit creation of new user profiles then EFI_ACCESS_DENIED will be returned. If creation of new user profiles is not supported, then EFI_UNSUPPORTED is returned. Related Definitions

Status Codes Returned

Status Code Description
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.


Delete()

Summary Delete an existing user profile.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_USER_PROFILE_DELETE) (
  IN CONST EFI_USER_MANAGER_PROTOCOL *This,
  IN EFI_USER_PROFILE_HANDLE         User
  );

Parameters

Parameter Description
This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
User User profile handle.

Description
Delete an existing user profile. If the current user profile does not permit deletion of user profiles then EFI_ACCESS_DENIED will be returned. If there is only a single user profile then EFI_ACCESS_DENIED will be returned. If deletion of user profiles is not supported, then EFI_UNSUPPORTED will be returned.

Status Codes Returned

Status Code Description
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.

GetNext()

Enumerate all of the enrolled users on the platform.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_USER_PROFILE_GET_NEXT)(
  IN     CONST EFI_USER_MANAGER_PROTOCOL *This,
  IN OUT EFI_USER_PROFILE_HANDLE         *User
  );

Parameters

Parameter Description
This Points to the instance of this EFI_USER_MANAGER_PROTOCOL.
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.

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

Note: There is always at least one user profile.

Status Codes Returned

Status Code Description
EFI_SUCCESS Next enrolled user profile successfully returned.
EFI_INVALID_PARAMETER User is NULL.
EFI_ACCESS_DENIED Next enrolled user profile was not successfully returned.

Current()

Return the current user profile handle.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_USER_PROFILE_CURRENT)(
  IN  CONST EFI_USER_MANAGER_PROTOCOL  *This,
  OUT EFI_USER_PROFILE_HANDLE          *CurrentUser
  );

Parameters

Parameter Description
This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
CurrentUser On return, points to the current user profile handle.

Description
This function returns the current user profile handle.

Status Codes Returned

Status Code Description
EFI_SUCCESS Current user profile handle returned successfully.
EFI_INVALID_PARAMETER CurrentUser is NULL.

Identify()

Identify a user.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_USER_IDENTIFY) (
  IN  CONST EFI_USER_MANAGER_PROTOCOL *This,
  OUT EFI_USER_PROFILE_HANDLE         *User
  );

Parameters

Parameter Description
This Points to the instance of the EFI_USER_MANAGER_PROTOCOL.
User On return, points to the user profile handle for the current user profile.


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

Status Codes Returned

Status Code Description
EFI_SUCCESS User was successfully identified.
EFI_INVALID_PARAMETER User is NULL.
EFI_ACCESS_DENIED User was not successfully identified.

Find()

Find a user using a user information record.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_USER_PROFILE_FIND)(
  IN     CONST EFI_USER_MANAGER_PROTOCOL *This,
  IN OUT EFI_USER_PROFILE_HANDLE         *User,
  IN OUT EFI_USER_INFO_HANDLE            *UserInfo OPTIONAL,
  IN     CONST EFI_USER_INFO             *Info,
  IN     UINTN                               InfoSize
  );

Parameters

Parameter Description
This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
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.
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.
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.
InfoSize The size of Info, in bytes.

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

Status Codes Returned

Status Code Description
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.

Notify()

Called by credential provider to notify of information change.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_USER_PROFILE_NOTIFY)(
  IN CONST EFI_USER_MANAGER_PROTOCOL *This,
  IN EFI_HANDLE Changed
  );

Parameters

Parameter Description
This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
Changed Handle on which is installed an instance of the EFI_USER_CREDENTIAL_PROTOCOL where the user has changed.

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

If the User Identity Manager doesn’t support asynchronous changes in credentials, then this function should return EFI_UNSUPPORTED.

If the User Identity Manager supports this, it will call User() to get the user identifier and then GetNextInfo() and GetInfo() in the User Credential Protocol to get all of the information from the credential and add it.

Status Codes Returned

Status Code Description
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.

GetInfo()

Return information attached to the user.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_USER_PROFILE_GET_INFO)(
  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,
  );

Parameters

Parameter Description
This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
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. 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.
InfoSize On entry, points to the size of Info. On return, points to the size of the user information.

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

Status Codes Returned

Status Code Description
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.


SetInfo()

Add or update user information.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_USER_PROFILE_SET_INFO) (
  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
  );

Parameters

Parameter Description
This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
User Handle of the user whose profile will be changed.
UserInfo On entry, points to the handle of the user information record to change or NULL if the user information should be added to the user profile. On exit, points to the handle of the user credential information record.
Info Points to the user information.
InfoSize The size of Info, in bytes.

Description
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_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.

Status Codes Returned

Status Code Description
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.

DeleteInfo()

Delete user information.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_USER_PROFILE_DELETE_INFO) (
  IN CONST EFI_USER_MANAGER_PROTOCOL *This,
  IN EFI_USER_PROFILE_HANDLE         Handle,
  IN EFI_USER_INFO_HANDLE            UserInfo
  );

Parameters

Parameter Description
This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.
User Handle of the user whose information will be deleted.
UserInfo Handle of the user information to remove.

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

Status Codes Returned

Status Code Description
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.

GetNextInfo()

Enumerate all of the enrolled users on the platform.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_USER_PROFILE_GET_NEXT_INFO)(
  IN     CONST EFI_USER_MANAGER_PROTOCOL *This,
  IN     EFI_USER_INFO_HANDLE            User,
  IN OUT EFI_USER_INFO_HANDLE            *UserInfo
  );

Parameters

Parameter Description
This Points to the instance of this EFI_USER_MANAGER_PROTOCOL.
User Handle of the user whose information will be enumerated
UserInfo On entry, points to the previous user information handle or NULL to start enumeration. On exit, points to the next user information handle or NULL if there is no more user information.

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

Status Codes Returned

Status Code Description
EFI_SUCCESS User information returned.
EFI_NOT_FOUND No more user information found.

Copyright (C) 2008,2010 Phoenix Technologies Ltd. All Rights Reserved. Portions copyright (C) 2008 UEFI Forum, Inc. Used with permission

Personal tools