12 Appendix D CIFS UNIX Extension

12 Appendix D CIFS UNIX Extension

12.1 Introduction

The purpose of these extensions is to allow UNIX based CIFS clients and servers to exchange information used by UNIX systems, but not present in Windows based CIFS servers or clients . These extensions may not be implemented by all UNIX systems. Two simple examples are symbolic links and UNIX special files (e.g. UNIX named pipes).

The CIFS UNIX Extension are intended for use by all UNIX and UNIX-like systems the implement the CIFS protocol.

12.2 Principles

These are a set of principles that the extensions meet.

Minimal changes

To make the extensions easier to implement, the number of changes and additions were minimized.

Can be implemented on non-UNIX systems

While being useful for UNIX, the extension allow one end of the connection to be a non-UNIX system. This is so that other CIFS servers and clients can better integrate with a UNIX CIFS client or server.

Use current commands

The changes only affect current commands. There was no need for UNIX CIFS clients to use CIFS commands marked as obsolete, nor should there be any changes to obsolete requests .

Retain existing CIFS semantics

The existing semantics of CIFS are retained. Perhaps the most notable is that file names are case insensitive, but case should be preserved.

Use CIFS security model

The standard CIFS security model is still used. This requires each distinct user to be logged into the server.

Addition to dialect

This specification is an addition to the CIFS dialect, currently NT LM 0.12. It is selected by the capability bit in the server's Negotiate protocol response.

Future resilient

Future enhancements MUST not modify or change the meaning of previous implementations of the specification.

12.3 CIFS Protocol Modifications

This section details the require changes to the CIFS protocol that are needed to support CIFS UNIX Extensions. A summary of the changes is listed below.

In the Negotiate Protocol SMB reserve a capabilities bit, CAP_UNIX with the value of 0x00800000, in the Server capabilities field to indicate support of CIFS Extension for UNIX.

Reserve information levels numbers 0x200-0x2FF

TRANS2_QUERY_FS_INFORMATION, TRANS2_QUERY_PATH_INFO, TRANS2_QUERY_FILE_INFO, TRANS2_SET_PATH_INFO, TRANS2_SET_FILE_INFO, TRANS2_FINDFIRST, and TRANS2_FINDNEXT SMBs for CIFS Extensions for UNIX.

12.4 Modified SMBs

SMB

Modification

NEGOTIATE

Added CAP_UNIX (0x00800000) to the server capabilities field.

 

See 4.2

TRANS2_QUERY_FS_INFORMATION

Added Following Information Levels:

 

SMB_QUERY_CIFS_UNIX_INFO (0x200) See 4.1.6.7

TRANS2_QUERY_PATH_INFORMATION

Added Following Information Levels:

 

SMB_QUERY_FILE_UNIX_BASIC (0x200) See 4.2.15.12

 

SMB_QUERY_FILE_UNIX_LINK (0x201) See 4.2.15.13

TRANS2_QUERY_FILE_INFORMATION

Same modification as done in TRANS2_QUERY_PATH_INFORMATION

TRANS2_SET_PATH_INFORMATION

Added Following Information Levels:

 

SMB_SET_FILE_UNIX_BASIC (0x200) See 4.2.17.3

 

SMB_SET_FILE_UNIX_LINK (0x201) See 4.2.17.4

 

SMB_SET_FILE_UNIX_HLINK (0X203) See 4.2.17.5

TRANS2_SET_FILE_INFORMATION

Same modification as done in TRANS2_SET_PATH_INFORMATION

TRANS2_FINDFIRST

Added following Information Levels:

 

SMB_FIND_FILE_UNIX (0X202) See 4.3.4.8

TRANS2_FINDNEXT

Same modification as done in TRANS2_FINDFIRST

12.5 Guidelines for implementers

  • Once the Client determines that the server supports the CIFS UNIX Extension it should first send SMB_QUERY_CIFS_UNIX_INFO before sending any other CIFS UNIX Extension SMBs to determine the version and capabilities that are supported by the server.

  • Clients or servers using this extension should have no specific reserved filenames (e.g. CON, AUX, PRN), and should not need to take specific action to protect the other end of the connection from them. If they have any such requirements, they must do them internally. This also applies to reserved characters in filenames (e.g. : \ ).

  • Inodes can be transferred in the uniqueid field of SMB_QUERY_FILE_UNIX_BASIC (0x200).

  • Clients should operate in UNICODE if at all possible. A useful bridging step is to implement UTF-8

  • Symbolic links are created by calling TRANS2_SET_PATH_INFO with the SMB_QUERY_FILE_UNIX_LINK infolevel data structure provided.

  • Device file (and other special UNIX files) are created by calling TRANS2_SET_PATH_INFO with the SMB_QUERY_FILE_UNIX_BASIC infolevel data structure appropriately filled in for a device node.

  • Servers should return their timezone as UTC. This will then require no timezone mapping by the client or server. The NetRemoteTimeOfDay IPC should still return the real local time.

  • Creates with particular permissions can be achieved by sending a CREATE_AND_X and a TRANS2_SET_PATH_INFO SMBs.



Implementing CIFS. The Common Internet File System
Implementing CIFS: The Common Internet File System
ISBN: 013047116X
EAN: 2147483647
Year: 2002
Pages: 210

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net