]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/UserIdentification/UserProfileManagerDxe/ModifyIdentityPolicy.c
SecurityPkg: Clean up source files
[mirror_edk2.git] / SecurityPkg / UserIdentification / UserProfileManagerDxe / ModifyIdentityPolicy.c
index 7c58329591adcd0d49e084e643846319a2d98b66..602c4a8397c1ffcc79262717c682e965e859e55b 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The functions for identification policy modification.\r
-    \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   provider can't appear twice in one identity policy.\r
 \r
   @param[in] NewGuid       Points to the credential provider guid.\r
-  \r
+\r
   @retval TRUE     The NewGuid was found in the identity policy.\r
   @retval FALSE    The NewGuid was not found.\r
 \r
@@ -52,7 +52,7 @@ ProviderAlreadyInPolicy (
     }\r
     Offset += Identity->Length;\r
   }\r
-  \r
+\r
   return FALSE;\r
 }\r
 \r
@@ -70,12 +70,12 @@ ProviderAlreadyInPolicy (
 EFI_STATUS\r
 EnrollUserOnProvider (\r
   IN  EFI_USER_INFO_IDENTITY_POLICY              *Identity,\r
-  IN  EFI_USER_PROFILE_HANDLE                    User \r
+  IN  EFI_USER_PROFILE_HANDLE                    User\r
   )\r
 {\r
   UINTN                          Index;\r
   EFI_USER_CREDENTIAL2_PROTOCOL  *UserCredential;\r
-  \r
+\r
   //\r
   // Find the specified credential provider.\r
   //\r
@@ -86,7 +86,7 @@ EnrollUserOnProvider (
     }\r
   }\r
 \r
-  return EFI_NOT_FOUND;  \r
+  return EFI_NOT_FOUND;\r
 }\r
 \r
 \r
@@ -103,12 +103,12 @@ EnrollUserOnProvider (
 EFI_STATUS\r
 DeleteUserOnProvider (\r
   IN  EFI_USER_INFO_IDENTITY_POLICY              *Identity,\r
-  IN  EFI_USER_PROFILE_HANDLE                    User \r
+  IN  EFI_USER_PROFILE_HANDLE                    User\r
   )\r
 {\r
   UINTN                          Index;\r
   EFI_USER_CREDENTIAL2_PROTOCOL  *UserCredential;\r
-  \r
+\r
   //\r
   // Find the specified credential provider.\r
   //\r
@@ -119,13 +119,13 @@ DeleteUserOnProvider (
     }\r
   }\r
 \r
-  return EFI_NOT_FOUND;  \r
+  return EFI_NOT_FOUND;\r
 }\r
 \r
 \r
 /**\r
   Delete User's credental from all the providers that exist in User's identity policy.\r
-  \r
+\r
   @param[in]  IdentityPolicy     Point to User's identity policy.\r
   @param[in]  IdentityPolicyLen  The length of the identity policy.\r
   @param[in]  User               Points to user profile.\r
@@ -135,7 +135,7 @@ VOID
 DeleteCredentialFromProviders (\r
   IN     UINT8                                *IdentityPolicy,\r
   IN     UINTN                                 IdentityPolicyLen,\r
-  IN     EFI_USER_PROFILE_HANDLE               User \r
+  IN     EFI_USER_PROFILE_HANDLE               User\r
   )\r
 {\r
   EFI_USER_INFO_IDENTITY_POLICY    *Identity;\r
@@ -158,7 +158,7 @@ DeleteCredentialFromProviders (
 \r
 /**\r
   Remove the provider specified by Offset from the new user identification record.\r
-  \r
+\r
   @param[in]  IdentityPolicy    Point to user identity item in new identification policy.\r
   @param[in]  Offset            The item offset in the new identification policy.\r
 \r
@@ -187,11 +187,11 @@ DeleteProviderFromPolicy (
   if ((Offset + IdentityPolicy->Length) != mUserInfo.NewIdentityPolicyLen) {\r
     //\r
     // This provider is not the last item in the identification policy, delete it and the connector.\r
-    //    \r
+    //\r
     RemainingLen = mUserInfo.NewIdentityPolicyLen - Offset - DeleteLen;\r
     CopyMem ((UINT8 *) IdentityPolicy, (UINT8 *) IdentityPolicy + DeleteLen, RemainingLen);\r
   }\r
-  mUserInfo.NewIdentityPolicyLen -= DeleteLen;  \r
+  mUserInfo.NewIdentityPolicyLen -= DeleteLen;\r
 }\r
 \r
 \r
@@ -201,7 +201,7 @@ DeleteProviderFromPolicy (
   It is invoked when 'add option' in UI is pressed.\r
 \r
   @param[in] NewGuid       Points to the credential provider guid.\r
-  \r
+\r
 **/\r
 VOID\r
 AddProviderToPolicy (\r
@@ -248,7 +248,7 @@ AddProviderToPolicy (
     NewPolicyInfoLen = mUserInfo.NewIdentityPolicyLen + Policy->Length;\r
     FreePool (mUserInfo.NewIdentityPolicy);\r
   }\r
-  \r
+\r
   //\r
   // Save credential provider.\r
   //\r
@@ -325,7 +325,7 @@ UpdateCredentialProvider (
 \r
   @retval TRUE     The policy is a valid identity policy.\r
   @retval FALSE    The policy is not a valid identity policy.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 CheckNewIdentityPolicy (\r
@@ -337,7 +337,7 @@ CheckNewIdentityPolicy (
   EFI_INPUT_KEY                 Key;\r
   UINTN                         Offset;\r
   UINT32                        OpCode;\r
-  \r
+\r
   //\r
   // Check policy expression.\r
   //\r
@@ -349,7 +349,7 @@ CheckNewIdentityPolicy (
     //\r
     Identity = (EFI_USER_INFO_IDENTITY_POLICY *) (PolicyInfo + Offset);\r
     switch (Identity->Type) {\r
-      \r
+\r
     case EFI_USER_INFO_IDENTITY_TRUE:\r
       break;\r
 \r
@@ -408,11 +408,11 @@ CheckNewIdentityPolicy (
 \r
 /**\r
   Save the identity policy and update UI with it.\r
-  \r
-  This function will verify the new identity policy, in current implementation, \r
+\r
+  This function will verify the new identity policy, in current implementation,\r
   the identity policy can be:  T, P & P & P & ..., P | P | P | ...\r
   Here, "T" means "True", "P" means "Credential Provider", "&" means "and", "|" means "or".\r
-  Other identity policies are not supported.  \r
+  Other identity policies are not supported.\r
 \r
 **/\r
 VOID\r
@@ -439,7 +439,7 @@ SaveIdentityPolicy (
   if (EFI_ERROR (Status)) {\r
     return ;\r
   }\r
-  \r
+\r
   //\r
   // Update the informantion on credential provider.\r
   //\r
@@ -447,7 +447,7 @@ SaveIdentityPolicy (
   if (EFI_ERROR (Status)) {\r
     return ;\r
   }\r
-  \r
+\r
   //\r
   // Save new identification policy.\r
   //\r
@@ -461,7 +461,7 @@ SaveIdentityPolicy (
 \r
   Status = mUserManager->SetInfo (mUserManager, mModifyUser, &UserInfo, Info, Info->InfoSize);\r
   FreePool (Info);\r
-   \r
+\r
   //\r
   // Update the mUserInfo.IdentityPolicy by mUserInfo.NewIdentityPolicy\r
   //\r
@@ -473,7 +473,7 @@ SaveIdentityPolicy (
 \r
   mUserInfo.NewIdentityPolicy         = NULL;\r
   mUserInfo.NewIdentityPolicyLen      = 0;\r
-  mUserInfo.NewIdentityPolicyModified = FALSE;   \r
+  mUserInfo.NewIdentityPolicyModified = FALSE;\r
 \r
   //\r
   // Update identity policy choice.\r
@@ -494,7 +494,7 @@ AddIdentityPolicyItem (
   if (mProviderInfo->Count == 0) {\r
     return ;\r
   }\r
-  \r
+\r
   //\r
   // Check the identity policy.\r
   //\r