3.3.5.42 Receiving an SMB_COM_NEGOTIATE Request

When the server receives an SMB_COM_NEGOTIATE Request (section 2.2.4.52.1), it MUST read through the list of dialects offered by the client in the DialectString field of the request. If the Server.SupportDialects ADM element does not match with any of the dialects listed in the DialectString field, the server MUST set the DialectIndex value to 0xFFFF and return the Core Protocol form of the SMB_COM_NEGOTIATE Response (section 2.2.4.52.2).

If one or more dialects in the Server.SupportDialects ADM element match the dialects listed in the DialectString field, the index of the last matching dialect in Server.SupportDialects MUST be placed into the DialectIndex field of the SMB_COM_NEGOTIATE Response. Server.Connection.SelectedDialect MUST be set to an identifier, as listed in section 1.7, that corresponds to the DialectIndex field set in the response.

If the dialect selected is "NT LM 0.12" (NT LAN Manager), then:

  • The Server.Connection.NTLMChallenge is set to an 8-byte random number.

  • The bits of the SecurityMode field of the response are set based upon the values of the Server.ShareLevelAuthentication, Server.PlaintextAuthenticationPolicy, and Server.MessageSigningPolicy server ADM elements.

  • The MaxMpxCount field is set from the Server.MaxMpxCount ADM element.

  • The MaxNumberVcs field is set from the Server.MaxVcNumber ADM element.

  • The SessionKey field is set from the Server.Connection.SessionKey ADM element.

  • The MaxRawSize field is set from the Server.MaxRawSize ADM element.

  • The MaxBufferSize field is set from the Server.MaxBufferSize ADM element.

  • The Capabilities field is set from the Server.Capabilities ADM element.

  • The Challenge field is set from the Server.Connection.NTLMChallenge ADM element.

  • The ChallengeLength field is set to the length of the Challenge field.

  • Values for the remaining fields are provided as specified in section 2.2.4.52.2.

The SMB_COM_NEGOTIATE Response MUST be sent as specified in section 3.3.4.1.