CIFS Dialect Negotiation

The first message sent from an CIFS client to an CIFS server must be one whose command code is SMB_COM_NEGOTIATE. The format of this client request includes an array of NULL-terminated strings indicating the dialects of the CIFS protocol which the client supports. The server compares this list against the list of dialects the server supports and returns the index of the chosen dialect in the response message.

To authenticate, CIFS uses the standard procedures of RFC 2478 (GSS-API), which allow a client or server to call for authentication independently of the final choice of authentication method. For CIFS, the selected authentication method is either Kerberos or NTLM. By default, networked Windows 2000 or Windows XP platforms call for authentication using Kerberos. For a Windows 2000 or Windows XP platform, both Kerberos and NTLM Security Support Provider (SSP) authentication components are loaded at startup. Microsoft applications do not authenticate inline but make a Security Support Provider Interface (SSPI) Negotiate call to request authentication. A Negotiate call selects the appropriate SSP component to handle the request. As a result, networked Windows 2000 and Windows XP platforms attempt to authenticate using the Kerberos SSP; standalone and older Windows NT platforms use NTLM. A Windows 2000 CIFS server, for example, implicitly uses Kerberos for authentication.

If the PC NETWORK PROGRAM 1.0 dialect is negotiated, clients and servers support the following commands:

SMB_COM_CHECK_DIRECTORY
SMB_COM_CLOSE
SMB_COM_CLOSE_PRINT_FILE
SMB_COM_CREATE
SMB_COM_CREATE_DIRECTORY
SMB_COM_CREATE_NEW
SMB_COM_CREATE_TEMPORARY
SMB_COM_DELETE
SMB_COM_DELETE_DIRECTORY
SMB_COM_FLUSH
SMB_COM_GET_PRINT_QUEUE
SMB_COM_LOCK_BYTE_RANGE
SMB_COM_NEGOTIATE
SMB_COM_OPEN
SMB_COM_OPEN_PRINT_FILE
SMB_COM_PROCESS_EXIT
SMB_COM_QUERY_INFORMATION
SMB_COM_QUERY_INFORMATION_DISK
SMB_COM_READ
SMB_COM_RENAME
SMB_COM_SEARCH
SMB_COM_SEEK
SMB_COM_SET_INFORMATION
SMB_COM_TREE_CONNECT
SMB_COM_TREE_DISCONNECT
SMB_COM_UNLOCK_BYTE_RANGE
SMB_COM_WRITE
SMB_COM_WRITE_PRINT_FILE

If the LANMAN 1.0 dialect is negotiated, all of the messages in the previous list must be supported. Clients negotiating LANMAN 1.0 and higher dialects will probably no longer send SMB_COM_PROCESS_EXIT, and the response format for SMB_COM_NEGOTIATE is modified as well. The following commands are introduced with the LANMAN 1.0 dialect:

SMB_COM_COPY
SMB_COM_ECHO
SMB_COM_FIND
SMB_COM_FIND_CLOSE
SMB_COM_FIND_UNIQUE
SMB_COM_IOCTL
SMB_COM_IOCTL_SECONDARY
SMB_COM_LOCK_AND_READ
SMB_COM_LOCKING_ANDX
SMB_COM_MOVE
SMB_COM_OPEN_ANDX
SMB_COM_QUERY_INFORMATION2
SMB_COM_READ_ANDX
SMB_COM_READ_MPX
SMB_COM_READ_RAW
SMB_COM_SESSION_SETUP_ANDX
SMB_COM_SET_INFORMATION2
SMB_COM_TRANSACTION
SMB_COM_TRANSACTION_SECONDARY
SMB_COM_TREE_CONNECT_ANDX
SMB_COM_WRITE_AND_CLOSE
SMB_COM_WRITE_AND_UNLOCK
SMB_COM_WRITE_ANDX
SMB_COM_WRITE_COMPLETE
SMB_COM_WRITE_MPX
SMB_COM_WRITE_MPX_SECONDARY
SMB_COM_WRITE_RAW

The LM1.2X002 dialect includes the following commands:

SMB_COM_FIND_CLOSE2
SMB_COM_LOGOFF_ANDX
SMB_COM_TRANSACTION2
SMB_COM_TRANSACTION2_SECONDARY

The NTLM 0.12 dialect includes the following commands:

SMB_COM_NT_CANCEL
SMB_COM_NT_CREATE_ANDX
SMB_COM_NT_RENAME
SMB_COM_NT_TRANSACT
SMB_COM_NT_TRANSACT_SECONDARY

See Also

Royalty-Free CIFS Technical Reference License Agreement