[cifs-protocol] [REG:111122854095339] Note regarding SMB_COM_NEGOTIATE

Bryan Burgin bburgin at microsoft.com
Wed Dec 28 08:10:43 MST 2011


[dochelp to bcc]
[Adding case number and casemail]

Hi Chris,

I'll file a TDI on this.  We created 111122854095339 to track this issue.  My intention is to close it as soon as the TDI is filed, which will be later today.

Thank you for raising this issue with us.

Bryan

-----Original Message-----
From: Christopher R. Hertel [mailto:crh at samba.org] 
Sent: Tuesday, December 27, 2011 5:22 PM
To: cifs-protocol at samba.org; Interoperability Documentation Help
Subject: Note regarding SMB_COM_NEGOTIATE

Dear DocHelp:

[MS-CIFS] section 2.2.4.52 states the following:

  This command is used to initiate an SMB session between the client and the
  server. An SMB_COM_NEGOTIATE exchange MUST be completed before any other
  SMB messages are sent to the server.

  There MUST only one SMB_COM_NEGOTIATE exchange per SMB session. Subsequent
  SMB_COM_NEGOTIATE requests received by the server MUST be rejected with an
  error response. The server MUST NOT take any other action.

The term "session", used in both paragraphs, is incorrect.  The correct wording would be:

  This command is used to initialize an SMB connection between the client
  and the server. An SMB_COM_NEGOTIATE exchange MUST be completed before
  any other SMB messages are sent to the server.

  There MUST only one SMB_COM_NEGOTIATE exchange per SMB connection.
  Subsequent SMB_COM_NEGOTIATE requests received by the server MUST be
  rejected with an error response. The server MUST NOT take any other
  action.

The key here is that NEGOTIATE message initializes an SMB connection, establishing the initial state of the connection itself.  A "session" is established using the SMB_COM_SESSION_SETUP_ANDX message.  The difference between an SMB connection and an SMB session is made clear in section 3 of the document (though it might help to add these terms to the glossary).

Basically, an "SMB Connection" is a logical connection between the client and server.  In older versions of the SMB1 protocol (and now again in SMB2.2), multiple physical connections could be used to create one logical SMB connection.  These days, for SMB1 (aka. CIFS), the SMB Connection is typically carried over NetBIOS over TCP/IP (NBT) or naked ("Direct Hosted") TCP/IP.  The SMB_COM_NEGOTIATE command is used to establish the parameters of the connection itself.

An "SMB Session", in contrast, is created using the SMB_COM_SESSION_SETUP_ANDX.  It includes a user context, among other things.
 In older versions of SMB1, the SMB_COM_SESSION_SETUP_ANDX could also be used to add additional physical connections to an existing SMB Connection.

It is very likely that this error is something that was missed when the document was delivered.  My apologies.  The new wording that I have presented, above, should be sufficient to correct the (minor) problem.

Chris -)-----

--
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org




More information about the cifs-protocol mailing list