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