]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
CIFS: use DFS pathnames in SMB2+ Create requests
authorAurelien Aptel <aaptel@suse.com>
Wed, 22 Feb 2017 13:47:17 +0000 (14:47 +0100)
committerSteve French <smfrench@gmail.com>
Thu, 2 Mar 2017 23:04:58 +0000 (17:04 -0600)
commitf0712928be1a66c99c35f871b4df7fa23ec1574a
tree3262f33e0131838da803cc1e7c20da2605bbc6f3
parentb9043cc5b99e9c93596a28647fd9f526f5bfa22c
CIFS: use DFS pathnames in SMB2+ Create requests

When connected to a DFS capable share, the client must set the
SMB2_FLAGS_DFS_OPERATIONS flag in the SMB2 header and use
DFS path names: "<server>\<share>\<path>" *without* leading \\.

Sources:

[MS-SMB2] 3.2.5.5 Receiving an SMB2 TREE_CONNECT Response
> TreeConnect.IsDfsShare MUST be set to TRUE, if the SMB2_SHARE_CAP_DFS
> bit is set in the Capabilities field of the response.

[MS-SMB2] 3.2.4.3 Application Requests Opening a File
> If TreeConnect.IsDfsShare is TRUE, the SMB2_FLAGS_DFS_OPERATIONS flag
> is set in the Flags field.

[MS-SMB2] 2.2.13 SMB2 CREATE Request, NameOffset:
> If SMB2_FLAGS_DFS_OPERATIONS is set in the Flags field of the SMB2
> header, the file name includes a prefix that will be processed during
> DFS name normalization as specified in section 3.3.5.9. Otherwise, the
> file name is relative to the share that is identified by the TreeId in
> the SMB2 header.

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Acked-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/smb2pdu.c