EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.h

Go to the documentation of this file.
00001 
00015 #ifndef __EFI_USER_PROFILE_MANAGER_H__
00016 #define __EFI_USER_PROFILE_MANAGER_H__
00017 
00018 #include <Uefi.h>
00019 
00020 #include <Guid/GlobalVariable.h>
00021 #include <Guid/MdeModuleHii.h>
00022 
00023 #include <Protocol/HiiConfigAccess.h>
00024 #include <Protocol/DevicePathToText.h>
00025 #include <Protocol/UserCredential2.h>
00026 #include <Protocol/UserManager.h>
00027 
00028 #include <Library/UefiRuntimeServicesTableLib.h>
00029 #include <Library/UefiBootServicesTableLib.h>
00030 #include <Library/MemoryAllocationLib.h>
00031 #include <Library/BaseMemoryLib.h>
00032 #include <Library/DevicePathLib.h>
00033 #include <Library/DebugLib.h>
00034 #include <Library/UefiLib.h>
00035 #include <Library/PrintLib.h>
00036 #include <Library/HiiLib.h>
00037 
00038 #include "UserProfileManagerData.h"
00039 
00040 #define  USER_NAME_LENGTH          17
00041 
00042 //
00043 // Credential Provider Information.
00044 //
00045 typedef struct {
00046   UINTN                         Count;
00047   EFI_USER_CREDENTIAL2_PROTOCOL *Provider[1];
00048 } CREDENTIAL_PROVIDER_INFO;
00049 
00050 //
00051 // User profile information structure.
00052 //
00053 typedef struct {
00054   UINT64    UsageCount;
00055   EFI_TIME  CreateDate;
00056   EFI_TIME  UsageDate;
00057   UINTN     AccessPolicyLen;
00058   UINTN     IdentityPolicyLen;
00059   UINTN     NewIdentityPolicyLen;    
00060   UINT8     *AccessPolicy;
00061   UINT8     *IdentityPolicy;
00062   UINT8     *NewIdentityPolicy;
00063   CHAR16    UserName[USER_NAME_LENGTH];
00064   BOOLEAN   CreateDateExist;
00065   BOOLEAN   UsageDateExist;
00066   BOOLEAN   AccessPolicyModified;
00067   BOOLEAN   IdentityPolicyModified;
00068   BOOLEAN   NewIdentityPolicyModified;
00069 } USER_INFO;
00070 
00071 //
00072 // User access information structure.
00073 //
00074 typedef struct {
00075   UINTN  LoadPermitLen;
00076   UINTN  LoadForbidLen;
00077   UINTN  ConnectPermitLen;
00078   UINTN  ConnectForbidLen;
00079   UINT8  *LoadPermit;
00080   UINT8  *LoadForbid;
00081   UINT8  *ConnectPermit;
00082   UINT8  *ConnectForbid;
00083   UINT32 AccessBootOrder;
00084   UINT8  AccessRight;
00085   UINT8  AccessSetup;
00086 } USER_INFO_ACCESS;
00087 
00088 #define USER_PROFILE_MANAGER_SIGNATURE  SIGNATURE_32 ('U', 'P', 'M', 'S')
00089 
00090 typedef struct {
00091   UINTN                           Signature;
00092   EFI_HANDLE                      DriverHandle;
00093   EFI_HII_HANDLE                  HiiHandle;
00094   EFI_HII_CONFIG_ACCESS_PROTOCOL  ConfigAccess;
00095 } USER_PROFILE_MANAGER_CALLBACK_INFO;
00096 
00097 //
00098 // HII specific Vendor Device Path definition.
00099 //
00100 typedef struct {
00101   VENDOR_DEVICE_PATH        VendorDevicePath;
00102   EFI_DEVICE_PATH_PROTOCOL  End;
00103 } HII_VENDOR_DEVICE_PATH;
00104 
00105 //
00106 // This is the generated IFR binary data for each formset defined in VFR.
00107 //
00108 extern UINT8                               UserProfileManagerVfrBin[];
00109 
00110 //
00111 // This is the generated String package data for .UNI file.
00112 //
00113 extern UINT8                               UserProfileManagerStrings[];
00114 
00115 //
00116 // The user manager protocol, used in several function.
00117 //
00118 extern EFI_USER_MANAGER_PROTOCOL           *mUserManager;
00119 
00120 //
00121 // The credential providers database in system.
00122 //
00123 extern CREDENTIAL_PROVIDER_INFO            *mProviderInfo;
00124 
00125 //
00126 // The variables used to update identity policy.
00127 //
00128 extern UINT8                               mProviderChoice;
00129 extern UINT8                               mConncetLogical;
00130 
00131 //
00132 // The variables used to update access policy.
00133 //
00134 extern USER_INFO_ACCESS                    mAccessInfo;
00135 
00136 //
00137 // The user information used to record all data in UI.
00138 //
00139 extern USER_INFO                           mUserInfo;
00140 
00141 extern USER_PROFILE_MANAGER_CALLBACK_INFO  *mCallbackInfo;
00142 
00143 extern EFI_USER_PROFILE_HANDLE             mModifyUser;
00144 
00155 CHAR16 *
00156 GetStringById (
00157   IN EFI_STRING_ID             Id
00158   );
00159 
00164 VOID
00165 CallAddUser (
00166   VOID
00167   );
00168 
00173 VOID
00174 SelectUserToModify  (
00175   VOID
00176   );
00177 
00182 VOID
00183 SelectUserToDelete (
00184   VOID
00185   );
00186 
00193 VOID
00194 DeleteUser (
00195   IN UINT8                                      UserIndex
00196   );
00197 
00206 VOID
00207 AddUserToForm (
00208   IN  EFI_USER_PROFILE_HANDLE                   User,
00209   IN  UINT16                                    Index,
00210   IN  VOID                                      *OpCodeHandle
00211   );
00212 
00222 VOID
00223 ModifyUserInfo (
00224   IN UINT8                                      UserIndex
00225   );
00226 
00232 VOID
00233 ModifyUserName (
00234   VOID
00235   );
00236 
00241 VOID
00242 ModifyIdentityPolicy (
00243   VOID
00244   );
00245 
00250 VOID
00251 AddIdentityPolicyItem (
00252   VOID
00253   );
00254 
00264 VOID
00265 SaveIdentityPolicy (
00266   VOID
00267   );
00268 
00276 VOID
00277 ModidyAccessPolicy (
00278   VOID
00279   );
00280 
00286 VOID
00287 SaveAccessPolicy (
00288   VOID
00289   );
00290 
00300 EFI_STATUS
00301 GetAccessRight (
00302   OUT  UINT32                                    *AccessRight
00303   );
00304 
00309 VOID
00310 DisplayLoadPermit(
00311   VOID
00312   );
00313 
00318 VOID
00319 DisplayLoadForbid (
00320   VOID
00321   );
00322 
00327 VOID
00328 DisplayConnectPermit (
00329   VOID
00330   );
00331 
00336 VOID
00337 DisplayConnectForbid (
00338   VOID
00339   );
00340 
00348 VOID
00349 DeleteFromForbidLoad (
00350   IN  UINT16                                    DriverIndex
00351   );
00352   
00360 VOID
00361 AddToForbidLoad (
00362   IN  UINT16                                    DriverIndex
00363   );
00364 
00377 EFI_STATUS
00378 GetUserNameInput (
00379   IN OUT  UINTN         *UserNameLen,
00380      OUT  CHAR16        *UserName
00381   );
00382 
00394 EFI_STATUS
00395 FindInfoByType (
00396   IN  EFI_USER_PROFILE_HANDLE                   User,
00397   IN  UINT8                                     InfoType,
00398   OUT EFI_USER_INFO_HANDLE                      *UserInfo
00399   );
00400 
00410 VOID
00411 ResolveIdentityPolicy (
00412   IN  UINT8                                     *Ip,
00413   IN  UINTN                                     IpLen,
00414   IN  EFI_STRING_ID                             IpStringId
00415   );
00416 
00424 VOID
00425 ExpandMemory (
00426   IN      UINTN                                 ValidLen,
00427   IN      UINTN                                 ExpandLen
00428   );
00429 
00438 VOID
00439 DeleteCredentialFromProviders (
00440   IN     UINT8                                *IdentityPolicy,
00441   IN     UINTN                                 IdentityPolicyLen,
00442   IN     EFI_USER_PROFILE_HANDLE               User 
00443   );
00444   
00445 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines