Partilhar via


3.1.5.6.4 SamrSetInformationUser2 (Opnum 58)

The SamrSetInformationUser2 method updates attributes on a user object.

 long SamrSetInformationUser2(
   [in] SAMPR_HANDLE UserHandle,
   [in] USER_INFORMATION_CLASS UserInformationClass,
   [in, switch_is(UserInformationClass)] 
     PSAMPR_USER_INFO_BUFFER Buffer
 );

UserHandle: An RPC context handle, as specified in section 2.2.7.2, representing a user object.

UserInformationClass: An enumeration indicating which attributes to update. See section 2.2.6.28 for a listing of possible values.

Buffer: The requested attributes and values to update. See section 2.2.6.29 for structure details.

This protocol asks the RPC runtime, via the strict_context_handle attribute, to reject the use of context handles created by a method of a different RPC interface than this one, as specified in [MS-RPCE] section 3.

Upon receiving this message, the server MUST process the data from the message subject to the following constraints:

  1. The server MUST return an error if UserHandle.HandleType is not equal to "User".

  2. UserHandle.GrantedAccess MUST have the required access specified in UserAllInformation (Common) (section 3.1.5.6.4.2).

  3. The constraints in the following sections MUST be satisfied based on the UserInformationClass parameter. If there is no match in the table, the constraints of section 3.1.5.6.4.1 MUST be used.

    UserInformationClass

    Constraint section

    UserAllInformation

    3.1.5.6.4.3

    UserInternal4Information

    3.1.5.6.4.4

    UserInternal4InformationNew

    3.1.5.6.4.5

    UserInternal8Information

    3.1.5.6.4.6