Compartir a través de


3.3.5.22 Receiving an SMB_COM_LOCK_AND_READ Request

When the server receives an SMB_COM_LOCK_AND_READ Request (section 2.2.4.20.1), if the request is on a named pipe, the server MUST fail the request with an NT status code of STATUS_INVALID_DEVICE_REQUEST (0xC0000010); otherwise, the server MUST treat the request as if it is an SMB_COM_LOCK_BYTE_RANGE Request (section 2.2.4.13.1) followed by an SMB_COM_READ Request (section 2.2.4.11.1). Processing MUST proceed as specified in sections 3.3.5.15 and 3.3.5.13, with the following exceptions:

  • Their triggering requests will be the SMB_COM_LOCK_AND_READ Request of this event.

  • If processing results in an error during the process specified in section 3.3.5.15, the server MUST construct an SMB_COM_LOCK_AND_READ (section 2.2.4.20.1) error response and MUST NOT continue to the process indicated in section 3.3.5.13.

  • If processing results in an error during the process specified in section 3.3.5.13, the server MUST construct an SMB_COM_LOCK_AND_READ Request error response.

  • The server MUST construct an SMB_COM_LOCK_AND_READ Response (section 2.2.4.20.2) instead of the messages indicated in 3.3.5.15 and 3.3.5.13.

  • The response fields MUST be populated with the data that would go in the corresponding fields of both SMB_COM_LOCK_BYTE_RANGE Request (section 2.2.4.13.1) and SMB_COM_READ Response (section 2.2.4.11.2) messages.

An entry for the newly-granted byte-range lock MUST be added to Server.Open.Locks. The type of the lock MUST be exclusive, and the entry MUST be formatted with a 32-bit offset (LOCKING_ANDX_RANGE32).<273>

The response MUST be sent to the client as specified in section 3.3.4.1.