]>
Commit | Line | Data |
---|---|---|
2832b228 | 1 | /** @file\r |
ea9b6bb4 | 2 | UEFI User Manager Protocol definition.\r |
2832b228 | 3 | \r |
4 | This protocol manages user profiles.\r | |
5 | \r | |
9095d37b | 6 | Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 7 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
2832b228 | 8 | \r |
9 | **/\r | |
10 | \r | |
11 | #ifndef __USER_MANAGER_H__\r | |
12 | #define __USER_MANAGER_H__\r | |
13 | \r | |
2832b228 | 14 | ///\r |
15 | /// Global ID for the User Manager Protocol\r | |
16 | ///\r | |
17 | #define EFI_USER_MANAGER_PROTOCOL_GUID \\r | |
18 | { \\r | |
19 | 0x6fd5b00c, 0xd426, 0x4283, { 0x98, 0x87, 0x6c, 0xf5, 0xcf, 0x1c, 0xb1, 0xfe } \\r | |
20 | }\r | |
21 | \r | |
22 | #define EFI_EVENT_GROUP_USER_PROFILE_CHANGED \\r | |
23 | { \\r | |
24 | 0xbaf1e6de, 0x209e, 0x4adb, { 0x8d, 0x96, 0xfd, 0x8b, 0x71, 0xf3, 0xf6, 0x83 } \\r | |
25 | }\r | |
26 | \r | |
75dad611 | 27 | typedef VOID *EFI_USER_PROFILE_HANDLE;\r |
28 | typedef VOID *EFI_USER_INFO_HANDLE;\r | |
29 | \r | |
30 | ///\r | |
31 | /// The attributes of the user profile information.\r | |
32 | ///\r | |
33 | typedef UINT16 EFI_USER_INFO_ATTRIBS;\r | |
34 | #define EFI_USER_INFO_STORAGE 0x000F\r | |
35 | #define EFI_USER_INFO_STORAGE_VOLATILE 0x0000\r | |
36 | #define EFI_USER_INFO_STORAGE_CREDENTIAL_NV 0x0001\r | |
37 | #define EFI_USER_INFO_STORAGE_PLATFORM_NV 0x0002\r | |
38 | \r | |
39 | #define EFI_USER_INFO_ACCESS 0x0070\r | |
40 | #define EFI_USER_INFO_PUBLIC 0x0010\r | |
41 | #define EFI_USER_INFO_PRIVATE 0x0020\r | |
42 | #define EFI_USER_INFO_PROTECTED 0x0030\r | |
43 | #define EFI_USER_INFO_EXCLUSIVE 0x0080\r | |
44 | \r | |
45 | ///\r | |
46 | /// User information structure\r | |
47 | ///\r | |
48 | typedef struct {\r | |
49 | ///\r | |
9095d37b | 50 | /// The user credential identifier associated with this user information or else Nil if the\r |
75dad611 | 51 | /// information is not associated with any specific credential.\r |
52 | ///\r | |
53 | EFI_GUID Credential;\r | |
54 | ///\r | |
55 | /// The type of user information.\r | |
56 | ///\r | |
57 | UINT8 InfoType;\r | |
58 | ///\r | |
59 | /// Must be set to 0.\r | |
60 | ///\r | |
61 | UINT8 Reserved1;\r | |
62 | ///\r | |
63 | /// The attributes of the user profile information.\r | |
64 | ///\r | |
65 | EFI_USER_INFO_ATTRIBS InfoAttribs;\r | |
66 | ///\r | |
67 | /// The size of the user information, in bytes, including this header.\r | |
68 | ///\r | |
69 | UINT32 InfoSize;\r | |
70 | } EFI_USER_INFO;\r | |
71 | \r | |
72 | ///\r | |
73 | /// User credential class GUIDs\r | |
74 | ///\r | |
75 | #define EFI_USER_CREDENTIAL_CLASS_UNKNOWN \\r | |
76 | { 0x5cf32e68, 0x7660, 0x449b, { 0x80, 0xe6, 0x7e, 0xa3, 0x6e, 0x3, 0xf6, 0xa8 } }\r | |
77 | #define EFI_USER_CREDENTIAL_CLASS_PASSWORD \\r | |
78 | { 0xf8e5058c, 0xccb6, 0x4714, { 0xb2, 0x20, 0x3f, 0x7e, 0x3a, 0x64, 0xb, 0xd1 } }\r | |
79 | #define EFI_USER_CREDENTIAL_CLASS_SMART_CARD \\r | |
80 | { 0x5f03ba33, 0x8c6b, 0x4c24, { 0xaa, 0x2e, 0x14, 0xa2, 0x65, 0x7b, 0xd4, 0x54 } }\r | |
81 | #define EFI_USER_CREDENTIAL_CLASS_FINGERPRINT \\r | |
82 | { 0x32cba21f, 0xf308, 0x4cbc, { 0x9a, 0xb5, 0xf5, 0xa3, 0x69, 0x9f, 0x4, 0x4a } }\r | |
83 | #define EFI_USER_CREDENTIAL_CLASS_HANDPRINT \\r | |
84 | { 0x5917ef16, 0xf723, 0x4bb9, { 0xa6, 0x4b, 0xd8, 0xc5, 0x32, 0xf4, 0xd8, 0xb5 } }\r | |
85 | #define EFI_USER_CREDENTIAL_CLASS_SECURE_CARD \\r | |
86 | { 0x8a6b4a83, 0x42fe, 0x45d2, { 0xa2, 0xef, 0x46, 0xf0, 0x6c, 0x7d, 0x98, 0x52 } }\r | |
87 | \r | |
88 | typedef UINT64 EFI_CREDENTIAL_CAPABILITIES;\r | |
89 | #define EFI_CREDENTIAL_CAPABILITIES_ENROLL 0x0000000000000001\r | |
90 | \r | |
91 | ///\r | |
9095d37b | 92 | /// Credential logon flags\r |
75dad611 | 93 | ///\r |
94 | typedef UINT32 EFI_CREDENTIAL_LOGON_FLAGS;\r | |
95 | #define EFI_CREDENTIAL_LOGON_FLAG_AUTO 0x00000001\r | |
96 | #define EFI_CREDENTIAL_LOGON_FLAG_DEFAULT 0x00000002\r | |
97 | \r | |
98 | ///\r | |
99 | /// User information record types\r | |
100 | ///\r | |
101 | \r | |
102 | ///\r | |
103 | /// No information.\r | |
104 | ///\r | |
105 | #define EFI_USER_INFO_EMPTY_RECORD 0x00\r | |
106 | ///\r | |
107 | /// Provide the user's name for the enrolled user.\r | |
108 | ///\r | |
109 | #define EFI_USER_INFO_NAME_RECORD 0x01\r | |
110 | typedef CHAR16 *EFI_USER_INFO_NAME;\r | |
111 | ///\r | |
112 | /// Provides the date and time when the user profile was created.\r | |
113 | ///\r | |
114 | #define EFI_USER_INFO_CREATE_DATE_RECORD 0x02\r | |
115 | typedef EFI_TIME EFI_USER_INFO_CREATE_DATE;\r | |
116 | ///\r | |
117 | /// Provides the date and time when the user profile was selected.\r | |
118 | ///\r | |
119 | #define EFI_USER_INFO_USAGE_DATE_RECORD 0x03\r | |
120 | typedef EFI_TIME EFI_USER_INFO_USAGE_DATE;\r | |
121 | ///\r | |
122 | /// Provides the number of times that the user profile has been selected.\r | |
123 | ///\r | |
124 | #define EFI_USER_INFO_USAGE_COUNT_RECORD 0x04\r | |
125 | typedef UINT64 EFI_USER_INFO_USAGE_COUNT;\r | |
126 | ///\r | |
127 | /// Provides a unique non-volatile user identifier for each enrolled user.\r | |
128 | ///\r | |
129 | #define EFI_USER_INFO_IDENTIFIER_RECORD 0x05\r | |
130 | typedef UINT8 EFI_USER_INFO_IDENTIFIER[16];\r | |
131 | ///\r | |
132 | /// Specifies the type of a particular credential associated with the user profile.\r | |
133 | ///\r | |
134 | #define EFI_USER_INFO_CREDENTIAL_TYPE_RECORD 0x06\r | |
135 | typedef EFI_GUID EFI_USER_INFO_CREDENTIAL_TYPE;\r | |
136 | ///\r | |
137 | /// Specifies the user-readable name of a particular credential type.\r | |
138 | ///\r | |
139 | #define EFI_USER_INFO_CREDENTIAL_TYPE_NAME_RECORD 0x07\r | |
140 | typedef CHAR16 *EFI_USER_INFO_CREDENTIAL_TYPE_NAME;\r | |
141 | ///\r | |
142 | /// Specifies the credential provider.\r | |
143 | ///\r | |
144 | #define EFI_USER_INFO_CREDENTIAL_PROVIDER_RECORD 0x08\r | |
145 | typedef EFI_GUID EFI_USER_INFO_CREDENTIAL_PROVIDER;\r | |
146 | ///\r | |
147 | /// Specifies the user-readable name of a particular credential's provider.\r | |
148 | ///\r | |
149 | #define EFI_USER_INFO_CREDENTIAL_PROVIDER_NAME_RECORD 0x09\r | |
150 | typedef CHAR16 *EFI_USER_INFO_CREDENTIAL_PROVIDER_NAME;\r | |
151 | ///\r | |
152 | /// Provides PKCS#11 credential information from a smart card.\r | |
153 | ///\r | |
154 | #define EFI_USER_INFO_PKCS11_RECORD 0x0A\r | |
155 | ///\r | |
9095d37b | 156 | /// Provides standard biometric information in the format specified by the ISO 19785 (Common\r |
75dad611 | 157 | /// Biometric Exchange Formats Framework) specification.\r |
158 | ///\r | |
159 | #define EFI_USER_INFO_CBEFF_RECORD 0x0B\r | |
160 | typedef VOID *EFI_USER_INFO_CBEFF;\r | |
161 | ///\r | |
162 | /// Indicates how close of a match the fingerprint must be in order to be considered a match.\r | |
163 | ///\r | |
164 | #define EFI_USER_INFO_FAR_RECORD 0x0C\r | |
165 | typedef UINT8 EFI_USER_INFO_FAR;\r | |
166 | ///\r | |
9095d37b | 167 | /// Indicates how many attempts the user has to with a particular credential before the system prevents\r |
75dad611 | 168 | /// further attempts.\r |
169 | ///\r | |
170 | #define EFI_USER_INFO_RETRY_RECORD 0x0D\r | |
171 | typedef UINT8 EFI_USER_INFO_RETRY;\r | |
172 | ///\r | |
173 | /// Provides the user's pre-OS access rights.\r | |
174 | ///\r | |
175 | #define EFI_USER_INFO_ACCESS_POLICY_RECORD 0x0E\r | |
176 | \r | |
177 | typedef struct {\r | |
178 | UINT32 Type; ///< Specifies the type of user access control.\r | |
179 | UINT32 Size; ///< Specifies the size of the user access control record, in bytes, including this header.\r | |
180 | } EFI_USER_INFO_ACCESS_CONTROL;\r | |
181 | \r | |
182 | typedef EFI_USER_INFO_ACCESS_CONTROL EFI_USER_INFO_ACCESS_POLICY;\r | |
183 | \r | |
184 | ///\r | |
185 | /// User Information access types\r | |
186 | ///\r | |
187 | \r | |
188 | ///\r | |
9095d37b | 189 | /// Forbids the user from booting or loading executables from the specified device path or any child\r |
75dad611 | 190 | /// device paths.\r |
191 | ///\r | |
192 | #define EFI_USER_INFO_ACCESS_FORBID_LOAD 0x00000001\r | |
193 | ///\r | |
9095d37b | 194 | /// Permits the user from booting or loading executables from the specified device path or any child\r |
75dad611 | 195 | /// device paths.\r |
196 | /// Note: in-consistency between code and the UEFI 2.3 specification here.\r | |
197 | /// The definition EFI_USER_INFO_ACCESS_PERMIT_BOOT in the specification should be typo and wait for\r | |
198 | /// spec update.\r | |
199 | ///\r | |
200 | #define EFI_USER_INFO_ACCESS_PERMIT_LOAD 0x00000002\r | |
201 | ///\r | |
202 | /// Presence of this record indicates that a user can update enrollment information.\r | |
203 | ///\r | |
204 | #define EFI_USER_INFO_ACCESS_ENROLL_SELF 0x00000003\r | |
205 | ///\r | |
206 | /// Presence of this record indicates that a user can enroll new users.\r | |
207 | ///\r | |
208 | #define EFI_USER_INFO_ACCESS_ENROLL_OTHERS 0x00000004\r | |
209 | ///\r | |
210 | /// Presence of this record indicates that a user can update the user information of any user.\r | |
211 | ///\r | |
212 | #define EFI_USER_INFO_ACCESS_MANAGE 0x00000005\r | |
213 | ///\r | |
214 | /// Describes permissions usable when configuring the platform.\r | |
215 | ///\r | |
216 | #define EFI_USER_INFO_ACCESS_SETUP 0x00000006\r | |
217 | ///\r | |
218 | /// Standard GUIDs for access to configure the platform.\r | |
219 | ///\r | |
220 | #define EFI_USER_INFO_ACCESS_SETUP_ADMIN_GUID \\r | |
221 | { 0x85b75607, 0xf7ce, 0x471e, { 0xb7, 0xe4, 0x2a, 0xea, 0x5f, 0x72, 0x32, 0xee } }\r | |
222 | #define EFI_USER_INFO_ACCESS_SETUP_NORMAL_GUID \\r | |
223 | { 0x1db29ae0, 0x9dcb, 0x43bc, { 0x8d, 0x87, 0x5d, 0xa1, 0x49, 0x64, 0xdd, 0xe2 } }\r | |
224 | #define EFI_USER_INFO_ACCESS_SETUP_RESTRICTED_GUID \\r | |
225 | { 0xbdb38125, 0x4d63, 0x49f4, { 0x82, 0x12, 0x61, 0xcf, 0x5a, 0x19, 0xa, 0xf8 } }\r | |
226 | \r | |
227 | ///\r | |
228 | /// Forbids UEFI drivers from being started from the specified device path(s) or any child device paths.\r | |
229 | ///\r | |
230 | #define EFI_USER_INFO_ACCESS_FORBID_CONNECT 0x00000007\r | |
231 | ///\r | |
232 | /// Permits UEFI drivers to be started on the specified device path(s) or any child device paths.\r | |
233 | ///\r | |
234 | #define EFI_USER_INFO_ACCESS_PERMIT_CONNECT 0x00000008\r | |
235 | ///\r | |
236 | /// Modifies the boot order.\r | |
237 | ///\r | |
238 | #define EFI_USER_INFO_ACCESS_BOOT_ORDER 0x00000009\r | |
239 | typedef UINT32 EFI_USER_INFO_ACCESS_BOOT_ORDER_HDR;\r | |
240 | \r | |
241 | #define EFI_USER_INFO_ACCESS_BOOT_ORDER_MASK 0x0000000F\r | |
242 | ///\r | |
243 | /// Insert new boot options at the beginning of the boot order.\r | |
244 | ///\r | |
245 | #define EFI_USER_INFO_ACCESS_BOOT_ORDER_INSERT 0x00000000\r | |
246 | ///\r | |
247 | /// Append new boot options to the end of the boot order.\r | |
248 | ///\r | |
249 | #define EFI_USER_INFO_ACCESS_BOOT_ORDER_APPEND 0x00000001\r | |
250 | ///\r | |
251 | /// Replace the entire boot order.\r | |
252 | ///\r | |
253 | #define EFI_USER_INFO_ACCESS_BOOT_ORDER_REPLACE 0x00000002\r | |
254 | ///\r | |
9095d37b | 255 | /// The Boot Manager will not attempt find a default boot device\r |
75dad611 | 256 | /// when the default boot order is does not lead to a bootable device.\r |
257 | ///\r | |
258 | #define EFI_USER_INFO_ACCESS_BOOT_ORDER_NODEFAULT 0x00000010\r | |
259 | \r | |
260 | ///\r | |
261 | /// Provides the expression which determines which credentials are required to assert user identity.\r | |
262 | ///\r | |
263 | #define EFI_USER_INFO_IDENTITY_POLICY_RECORD 0x0F\r | |
264 | \r | |
265 | typedef struct {\r | |
9095d37b | 266 | UINT32 Type; ///< Specifies either an operator or a data item.\r |
75dad611 | 267 | UINT32 Length; ///< The length of this block, in bytes, including this header.\r |
268 | } EFI_USER_INFO_IDENTITY_POLICY;\r | |
269 | \r | |
270 | ///\r | |
271 | /// User identity policy expression operators.\r | |
272 | ///\r | |
273 | #define EFI_USER_INFO_IDENTITY_FALSE 0x00\r | |
274 | #define EFI_USER_INFO_IDENTITY_TRUE 0x01\r | |
275 | #define EFI_USER_INFO_IDENTITY_CREDENTIAL_TYPE 0x02\r | |
276 | #define EFI_USER_INFO_IDENTITY_CREDENTIAL_PROVIDER 0x03\r | |
277 | #define EFI_USER_INFO_IDENTITY_NOT 0x10\r | |
278 | #define EFI_USER_INFO_IDENTITY_AND 0x11\r | |
279 | #define EFI_USER_INFO_IDENTITY_OR 0x12\r | |
280 | \r | |
281 | ///\r | |
282 | /// Provides placeholder for additional user profile information identified by a GUID.\r | |
283 | ///\r | |
284 | #define EFI_USER_INFO_GUID_RECORD 0xFF\r | |
285 | typedef EFI_GUID EFI_USER_INFO_GUID;\r | |
286 | \r | |
287 | ///\r | |
288 | /// User information table\r | |
289 | /// A collection of EFI_USER_INFO records, prefixed with this header.\r | |
290 | ///\r | |
291 | typedef struct {\r | |
292 | UINT64 Size; ///< Total size of the user information table, in bytes.\r | |
293 | } EFI_USER_INFO_TABLE;\r | |
294 | \r | |
2832b228 | 295 | typedef struct _EFI_USER_MANAGER_PROTOCOL EFI_USER_MANAGER_PROTOCOL;\r |
296 | \r | |
297 | /**\r | |
298 | Create a new user profile.\r | |
299 | \r | |
9095d37b | 300 | This function creates a new user profile with only a new user identifier attached and returns its\r |
2832b228 | 301 | handle. The user profile is non-volatile, but the handle User can change across reboots.\r |
302 | \r | |
303 | @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r | |
9095d37b | 304 | @param[out] User On return, points to the new user profile handle.\r |
2832b228 | 305 | The user profile handle is unique only during this boot.\r |
9095d37b | 306 | \r |
2832b228 | 307 | @retval EFI_SUCCESS User profile was successfully created.\r |
308 | @retval EFI_ACCESS_DENIED Current user does not have sufficient permissions to create a user profile.\r | |
309 | @retval EFI_UNSUPPORTED Creation of new user profiles is not supported.\r | |
310 | @retval EFI_INVALID_PARAMETER The User parameter is NULL.\r | |
311 | **/\r | |
312 | typedef\r | |
313 | EFI_STATUS\r | |
314 | (EFIAPI *EFI_USER_PROFILE_CREATE)(\r | |
315 | IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r | |
316 | OUT EFI_USER_PROFILE_HANDLE *User\r | |
317 | );\r | |
318 | \r | |
319 | /**\r | |
320 | Delete an existing user profile.\r | |
321 | \r | |
322 | @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r | |
9095d37b | 323 | @param[in] User User profile handle.\r |
2832b228 | 324 | \r |
325 | @retval EFI_SUCCESS User profile was successfully deleted.\r | |
326 | @retval EFI_ACCESS_DENIED Current user does not have sufficient permissions to delete a user\r | |
327 | profile or there is only one user profile.\r | |
328 | @retval EFI_UNSUPPORTED Deletion of new user profiles is not supported.\r | |
329 | @retval EFI_INVALID_PARAMETER User does not refer to a valid user profile.\r | |
330 | **/\r | |
331 | typedef\r | |
332 | EFI_STATUS\r | |
333 | (EFIAPI *EFI_USER_PROFILE_DELETE)(\r | |
334 | IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r | |
335 | IN EFI_USER_PROFILE_HANDLE User\r | |
336 | );\r | |
337 | \r | |
338 | /**\r | |
339 | Enumerate all of the enrolled users on the platform.\r | |
340 | \r | |
9095d37b LG |
341 | This function returns the next enrolled user profile. To retrieve the first user profile handle, point\r |
342 | User at a NULL. Each subsequent call will retrieve another user profile handle until there are no\r | |
343 | more, at which point User will point to NULL.\r | |
2832b228 | 344 | \r |
345 | @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r | |
9095d37b | 346 | @param[in,out] User On entry, points to the previous user profile handle or NULL to\r |
2832b228 | 347 | start enumeration. On exit, points to the next user profile handle\r |
348 | or NULL if there are no more user profiles.\r | |
349 | \r | |
9095d37b | 350 | @retval EFI_SUCCESS Next enrolled user profile successfully returned.\r |
2832b228 | 351 | @retval EFI_ACCESS_DENIED Next enrolled user profile was not successfully returned.\r |
352 | @retval EFI_INVALID_PARAMETER The User parameter is NULL.\r | |
353 | **/\r | |
354 | typedef\r | |
355 | EFI_STATUS\r | |
356 | (EFIAPI *EFI_USER_PROFILE_GET_NEXT)(\r | |
357 | IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r | |
358 | IN OUT EFI_USER_PROFILE_HANDLE *User\r | |
359 | );\r | |
360 | \r | |
361 | /**\r | |
362 | Return the current user profile handle.\r | |
363 | \r | |
364 | @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r | |
365 | @param[out] CurrentUser On return, points to the current user profile handle.\r | |
366 | \r | |
9095d37b | 367 | @retval EFI_SUCCESS Current user profile handle returned successfully.\r |
2832b228 | 368 | @retval EFI_INVALID_PARAMETER The CurrentUser parameter is NULL.\r |
369 | **/\r | |
370 | typedef\r | |
371 | EFI_STATUS\r | |
372 | (EFIAPI *EFI_USER_PROFILE_CURRENT)(\r | |
373 | IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r | |
374 | OUT EFI_USER_PROFILE_HANDLE *CurrentUser\r | |
375 | );\r | |
376 | \r | |
377 | /**\r | |
378 | Identify a user.\r | |
379 | \r | |
380 | Identify the user and, if authenticated, returns the user handle and changes the current user profile.\r | |
9095d37b LG |
381 | All user information marked as private in a previously selected profile is no longer available for\r |
382 | inspection.\r | |
383 | Whenever the current user profile is changed then the an event with the GUID\r | |
2832b228 | 384 | EFI_EVENT_GROUP_USER_PROFILE_CHANGED is signaled.\r |
385 | \r | |
386 | @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r | |
387 | @param[out] User On return, points to the user profile handle for the current user profile.\r | |
388 | \r | |
389 | @retval EFI_SUCCESS User was successfully identified.\r | |
390 | @retval EFI_ACCESS_DENIED User was not successfully identified.\r | |
391 | @retval EFI_INVALID_PARAMETER The User parameter is NULL.\r | |
392 | **/\r | |
393 | typedef\r | |
394 | EFI_STATUS\r | |
395 | (EFIAPI *EFI_USER_PROFILE_IDENTIFY)(\r | |
396 | IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r | |
397 | OUT EFI_USER_PROFILE_HANDLE *User\r | |
398 | );\r | |
399 | \r | |
400 | /**\r | |
401 | Find a user using a user information record.\r | |
402 | \r | |
9095d37b LG |
403 | This function searches all user profiles for the specified user information record. The search starts\r |
404 | with the user information record handle following UserInfo and continues until either the\r | |
2832b228 | 405 | information is found or there are no more user profiles.\r |
9095d37b | 406 | A match occurs when the Info.InfoType field matches the user information record type and the\r |
7fedcf9d | 407 | user information record data matches the portion of Info.\r |
2832b228 | 408 | \r |
409 | @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r | |
9095d37b LG |
410 | @param[in,out] User On entry, points to the previously returned user profile handle or NULL to start\r |
411 | searching with the first user profile. On return, points to the user profile handle or\r | |
2832b228 | 412 | NULL if not found.\r |
9095d37b LG |
413 | @param[in,out] UserInfo On entry, points to the previously returned user information handle or NULL to start\r |
414 | searching with the first. On return, points to the user information handle of the user\r | |
415 | information record or NULL if not found. Can be NULL, in which case only one user\r | |
416 | information record per user can be returned.\r | |
417 | @param[in] Info Points to the buffer containing the user information to be compared to the user\r | |
418 | information record. If the user information record data is empty, then only the user\r | |
419 | information record type is compared.\r | |
2832b228 | 420 | If InfoSize is 0, then the user information record must be empty.\r |
421 | \r | |
9095d37b | 422 | @param[in] InfoSize The size of Info, in bytes.\r |
2832b228 | 423 | \r |
7fedcf9d | 424 | @retval EFI_SUCCESS User information was found. User points to the user profile handle and UserInfo\r |
425 | points to the user information handle.\r | |
426 | @retval EFI_NOT_FOUND User information was not found. User points to NULL and UserInfo points to NULL.\r | |
427 | @retval EFI_INVALID_PARAMETER User is NULL. Or Info is NULL.\r | |
2832b228 | 428 | **/\r |
429 | typedef\r | |
430 | EFI_STATUS\r | |
431 | (EFIAPI *EFI_USER_PROFILE_FIND)(\r | |
432 | IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r | |
433 | IN OUT EFI_USER_PROFILE_HANDLE *User,\r | |
434 | IN OUT EFI_USER_INFO_HANDLE *UserInfo OPTIONAL,\r | |
435 | IN CONST EFI_USER_INFO *Info,\r | |
436 | IN UINTN InfoSize\r | |
437 | );\r | |
438 | \r | |
439 | /**\r | |
440 | Called by credential provider to notify of information change.\r | |
441 | \r | |
9095d37b | 442 | This function allows the credential provider to notify the User Identity Manager when user status\r |
ea9b6bb4 | 443 | has changed.\r |
9095d37b LG |
444 | If the User Identity Manager doesn't support asynchronous changes in credentials, then this function\r |
445 | should return EFI_UNSUPPORTED.\r | |
446 | If current user does not exist, and the credential provider can identify a user, then make the user\r | |
ea9b6bb4 | 447 | to be current user and signal the EFI_EVENT_GROUP_USER_PROFILE_CHANGED event.\r |
9095d37b | 448 | If current user already exists, and the credential provider can identify another user, then switch\r |
ea9b6bb4 | 449 | current user to the newly identified user, and signal the EFI_EVENT_GROUP_USER_PROFILE_CHANGED event.\r |
9095d37b | 450 | If current user was identified by this credential provider and now the credential provider cannot identify\r |
ea9b6bb4 | 451 | current user, then logout current user and signal the EFI_EVENT_GROUP_USER_PROFILE_CHANGED event.\r |
2832b228 | 452 | \r |
453 | @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r | |
454 | @param[in] Changed Handle on which is installed an instance of the\r | |
455 | EFI_USER_CREDENTIAL_PROTOCOL where the user has changed.\r | |
456 | \r | |
457 | @retval EFI_SUCCESS The User Identity Manager has handled the notification.\r | |
458 | @retval EFI_NOT_READY The function was called while the specified credential provider was not selected.\r | |
459 | @retval EFI_UNSUPPORTED The User Identity Manager doesn't support asynchronous notifications.\r | |
460 | **/\r | |
461 | typedef\r | |
462 | EFI_STATUS\r | |
463 | (EFIAPI *EFI_USER_PROFILE_NOTIFY)(\r | |
464 | IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r | |
465 | IN EFI_HANDLE Changed\r | |
466 | );\r | |
467 | \r | |
468 | /**\r | |
469 | Return information attached to the user.\r | |
470 | \r | |
9095d37b LG |
471 | This function returns user information. The format of the information is described in User\r |
472 | Information. The function may return EFI_ACCESS_DENIED if the information is marked private\r | |
473 | and the handle specified by User is not the current user profile. The function may return\r | |
474 | EFI_ACCESS_DENIED if the information is marked protected and the information is associated\r | |
2832b228 | 475 | with a credential provider for which the user has not been authenticated.\r |
476 | \r | |
477 | @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r | |
9095d37b LG |
478 | @param[in] User Handle of the user whose profile will be retrieved.\r |
479 | @param[in] UserInfo Handle of the user information data record.\r | |
480 | @param[out] Info On entry, points to a buffer of at least *InfoSize bytes. On exit, holds the user\r | |
481 | information. If the buffer is too small to hold the information, then\r | |
482 | EFI_BUFFER_TOO_SMALL is returned and InfoSize is updated to contain the\r | |
483 | number of bytes actually required.\r | |
484 | @param[in,out] InfoSize On entry, points to the size of Info. On return, points to the size of the user\r | |
485 | information.\r | |
2832b228 | 486 | \r |
487 | @retval EFI_SUCCESS Information returned successfully.\r | |
488 | @retval EFI_ACCESS_DENIED The information about the specified user cannot be accessed by the current user.\r | |
9095d37b | 489 | @retval EFI_BUFFER_TOO_SMALL The number of bytes specified by *InfoSize is too small to hold\r |
2832b228 | 490 | the returned data. The actual size required is returned in *InfoSize.\r |
7fedcf9d | 491 | @retval EFI_NOT_FOUND User does not refer to a valid user profile or UserInfo does not refer to a valid\r |
492 | user info handle.\r | |
493 | @retval EFI_INVALID_PARAMETER Info is NULL or InfoSize is NULL.\r | |
9095d37b | 494 | **/\r |
2832b228 | 495 | typedef\r |
496 | EFI_STATUS\r | |
497 | (EFIAPI *EFI_USER_PROFILE_GET_INFO)(\r | |
498 | IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r | |
499 | IN EFI_USER_PROFILE_HANDLE User,\r | |
500 | IN EFI_USER_INFO_HANDLE UserInfo,\r | |
501 | OUT EFI_USER_INFO *Info,\r | |
502 | IN OUT UINTN *InfoSize\r | |
503 | );\r | |
504 | \r | |
505 | /**\r | |
506 | Add or update user information.\r | |
507 | \r | |
9095d37b LG |
508 | This function changes user information. If NULL is pointed to by UserInfo, then a new user\r |
509 | information record is created and its handle is returned in UserInfo. Otherwise, the existing one is\r | |
2832b228 | 510 | replaced.\r |
9095d37b | 511 | If EFI_USER_INFO_IDENTITY_POLICY_RECORD is changed, it is the caller's responsibility to keep it to\r |
ea9b6bb4 | 512 | be synced with the information on credential providers.\r |
9095d37b LG |
513 | If EFI_USER_INFO_EXCLUSIVE is specified in Info and a user information record of the same\r |
514 | type already exists in the user profile, then EFI_ACCESS_DENIED will be returned and\r | |
2832b228 | 515 | UserInfo will point to the handle of the existing record.\r |
516 | \r | |
517 | @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r | |
9095d37b LG |
518 | @param[in] User Handle of the user whose profile will be retrieved.\r |
519 | @param[in,out] UserInfo Handle of the user information data record.\r | |
520 | @param[in] Info On entry, points to a buffer of at least *InfoSize bytes. On exit, holds the user\r | |
521 | information. If the buffer is too small to hold the information, then\r | |
522 | EFI_BUFFER_TOO_SMALL is returned and InfoSize is updated to contain the\r | |
523 | number of bytes actually required.\r | |
524 | @param[in] InfoSize On entry, points to the size of Info. On return, points to the size of the user\r | |
525 | information.\r | |
2832b228 | 526 | \r |
527 | @retval EFI_SUCCESS Information returned successfully.\r | |
528 | @retval EFI_ACCESS_DENIED The record is exclusive.\r | |
9095d37b | 529 | @retval EFI_SECURITY_VIOLATION The current user does not have permission to change the specified\r |
2832b228 | 530 | user profile or user information record.\r |
7fedcf9d | 531 | @retval EFI_NOT_FOUND User does not refer to a valid user profile or UserInfo does not refer to a valid\r |
532 | user info handle.\r | |
9095d37b LG |
533 | @retval EFI_INVALID_PARAMETER UserInfo is NULL or Info is NULL.\r |
534 | **/\r | |
2832b228 | 535 | typedef\r |
536 | EFI_STATUS\r | |
537 | (EFIAPI *EFI_USER_PROFILE_SET_INFO)(\r | |
538 | IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r | |
539 | IN EFI_USER_PROFILE_HANDLE User,\r | |
540 | IN OUT EFI_USER_INFO_HANDLE *UserInfo,\r | |
541 | IN CONST EFI_USER_INFO *Info,\r | |
542 | IN UINTN InfoSize\r | |
543 | );\r | |
544 | \r | |
545 | /**\r | |
546 | Delete user information.\r | |
547 | \r | |
548 | Delete the user information attached to the user profile specified by the UserInfo.\r | |
549 | \r | |
550 | @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r | |
551 | @param[in] User Handle of the user whose information will be deleted.\r | |
552 | @param[in] UserInfo Handle of the user information to remove.\r | |
553 | \r | |
554 | @retval EFI_SUCCESS User information deleted successfully.\r | |
555 | @retval EFI_NOT_FOUND User information record UserInfo does not exist in the user profile.\r | |
9095d37b LG |
556 | @retval EFI_ACCESS_DENIED The current user does not have permission to delete this user information.\r |
557 | **/\r | |
2832b228 | 558 | typedef\r |
559 | EFI_STATUS\r | |
560 | (EFIAPI *EFI_USER_PROFILE_DELETE_INFO)(\r | |
561 | IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r | |
562 | IN EFI_USER_PROFILE_HANDLE User,\r | |
563 | IN EFI_USER_INFO_HANDLE UserInfo\r | |
564 | );\r | |
565 | \r | |
566 | /**\r | |
567 | Enumerate user information of all the enrolled users on the platform.\r | |
568 | \r | |
9095d37b LG |
569 | This function returns the next user information record. To retrieve the first user information record\r |
570 | handle, point UserInfo at a NULL. Each subsequent call will retrieve another user information\r | |
571 | record handle until there are no more, at which point UserInfo will point to NULL.\r | |
2832b228 | 572 | \r |
7fedcf9d | 573 | @param[in] This Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r |
574 | @param[in] User Handle of the user whose information will be deleted.\r | |
575 | @param[in,out] UserInfo Handle of the user information to remove.\r | |
2832b228 | 576 | \r |
7fedcf9d | 577 | @retval EFI_SUCCESS User information returned.\r |
578 | @retval EFI_NOT_FOUND No more user information found.\r | |
579 | @retval EFI_INVALID_PARAMETER UserInfo is NULL.\r | |
9095d37b | 580 | **/\r |
2832b228 | 581 | typedef\r |
582 | EFI_STATUS\r | |
583 | (EFIAPI *EFI_USER_PROFILE_GET_NEXT_INFO)(\r | |
584 | IN CONST EFI_USER_MANAGER_PROTOCOL *This,\r | |
585 | IN EFI_USER_PROFILE_HANDLE User,\r | |
586 | IN OUT EFI_USER_INFO_HANDLE *UserInfo\r | |
587 | );\r | |
588 | \r | |
589 | ///\r | |
590 | /// This protocol provides the services used to manage user profiles.\r | |
591 | ///\r | |
592 | struct _EFI_USER_MANAGER_PROTOCOL {\r | |
593 | EFI_USER_PROFILE_CREATE Create;\r | |
594 | EFI_USER_PROFILE_DELETE Delete;\r | |
595 | EFI_USER_PROFILE_GET_NEXT GetNext;\r | |
596 | EFI_USER_PROFILE_CURRENT Current;\r | |
597 | EFI_USER_PROFILE_IDENTIFY Identify;\r | |
598 | EFI_USER_PROFILE_FIND Find;\r | |
599 | EFI_USER_PROFILE_NOTIFY Notify;\r | |
600 | EFI_USER_PROFILE_GET_INFO GetInfo;\r | |
601 | EFI_USER_PROFILE_SET_INFO SetInfo;\r | |
602 | EFI_USER_PROFILE_DELETE_INFO DeleteInfo;\r | |
603 | EFI_USER_PROFILE_GET_NEXT_INFO GetNextInfo;\r | |
604 | };\r | |
605 | \r | |
606 | extern EFI_GUID gEfiUserManagerProtocolGuid;\r | |
d14d2707 | 607 | extern EFI_GUID gEfiEventUserProfileChangedGuid;\r |
75dad611 | 608 | extern EFI_GUID gEfiUserCredentialClassUnknownGuid;\r |
609 | extern EFI_GUID gEfiUserCredentialClassPasswordGuid;\r | |
610 | extern EFI_GUID gEfiUserCredentialClassSmartCardGuid;\r | |
611 | extern EFI_GUID gEfiUserCredentialClassFingerprintGuid;\r | |
612 | extern EFI_GUID gEfiUserCredentialClassHandprintGuid;\r | |
613 | extern EFI_GUID gEfiUserCredentialClassSecureCardGuid;\r | |
614 | extern EFI_GUID gEfiUserInfoAccessSetupAdminGuid;\r | |
615 | extern EFI_GUID gEfiUserInfoAccessSetupNormalGuid;\r | |
616 | extern EFI_GUID gEfiUserInfoAccessSetupRestrictedGuid;\r | |
2832b228 | 617 | \r |
618 | #endif\r |