次の方法で共有


3.4.4.10 A Local Client Application Requests a Connection to a Share

The RPC client application provides:

  • The name of the server.

  • The name of the share.

  • Credentials to be used to connect to the server.

The client MUST first connect to the server as specified in section 3.2.4.2.1.

Next, the client MUST negotiate the protocol by any of the methods specified in [MS-SMB2] section 3.2.4.2.2, initially offering the highest protocol supported by the local client implementation.

If the negotiated protocol dialect is covered in [MS-CIFS] or in [MS-SMB], the client MUST authenticate the user by invoking the processing logic specified in section 3.2.4.2.4; next, the client MUST connect to the application-supplied share by invoking the processing logic specified in section 3.2.4.2.5.

If the negotiated protocol is that specified by [MS-SMB2], the client MUST authenticate the user by invoking the processing logic specified in [MS-SMB2] section 3.2.4.2.3, providing the credentials supplied by the caller; next, the client MUST connect to the application-supplied share by invoking the processing logic specified in [MS-SMB2] section 3.2.4.2.4.

Any error incurred during the processing of the preceding steps MUST be returned to the caller.

Upon successful completion, a new ClientGenericContext structure and ShareType MUST be initialized.

The ClientGenericContext.ProtocolDialect field MUST be set to an implementation-specific identifier indicating the protocol (either that specified by [MS-CIFS] or that specified by [MS-SMB2]).

The ClientGenericContext.ProtocolSpecificOpen field MUST be set to the protocol-specific Client.TreeConnect obtained by the processing logic specified in section 3.2.5.4 or in [MS-SMB] section 3.2.4.2.4.

ShareType MUST be set to the share type obtained by the processing logic specified in section 3.2.5.4 or in [MS-SMB2] section 3.2.4.2.4.

ClientGenericContext and ShareType MUST be returned to the caller.