3.3.5.29 Receiving an SMB_COM_SET_INFORMATION2 Request

Upon receiving an SMB_COM_SET_INFORMATION2 Request (section 2.2.4.30.1), the server MUST validate the FID by looking up the FID in Server.Connection.FileOpenTable, which MUST indicate a regular file. The UID MUST be used to find the Server.Session.UserSecurityContext, which MUST have sufficient privilege to set file attribute information. If the user does not have sufficient privileges, the server MUST send an error response with a status of STATUS_ACCESS_DENIED (ERRDOS/ERRnoaccess) and MUST increase Server.Statistics.sts0_permerrors by 1. If the UID presented is different from the UID that opened the file, the server MUST send the error response with a Status of STATUS_INVALID_HANDLE (ERRDOS/ERRbaduid).

The server MUST attempt to set the attribute on the file indicated by the FID. If an error is detected, the Status field of the response MUST be set to the error; otherwise, Status MUST be set to success. The response messages MUST be sent to the client as described in section 3.3.4.1.<285>