From: Aurelien Aptel <aaptel-IBi9RG/b67k@public.gmane.org>
To: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Aurelien Aptel <aaptel-IBi9RG/b67k@public.gmane.org>
Subject: [PATCH v1 0/6] Add support for DFS in smb2+
Date: Tue, 8 Nov 2016 17:33:20 +0100 [thread overview]
Message-ID: <1478622806-19636-1-git-send-email-aaptel@suse.com> (raw)
This series of patch tries to implement the get_dfs_refer operation
for smb2.
In smb2+, DFS resolving is now done through an FSCTL. The relevant
Microsoft specifications for this are:
MS-SMB2: 3.2.4.20 Application Requests an IO Control Code Operation
MS-SMB2: 3.2.4.20.3 Application Requests DFS Referral Information
MS-SMB2: 3.2.5.14 Receiving an SMB2 IOCTL Response
MS-SMB2: 3.2.5.14.4 Handling a DFS Referral Information Response
MS-DFSC: 2.2 Message Syntax (but really the whole document is useful)
I've managed to make it work while keeping the same prototype for the
operation but I believe it should be changed to be more correct and
closer to the rest of the smb2 code.
I've sucessfuly tested this against a Windows Server 2016 DFS setup.
There are some things that I'm not sure how to do properly:
* find the right tcon from the session object
* find the IPC tcon from the share tcon
I suspect these can be solved by changing the operation prototype so
it provides the right objects (tcon, cifs_sb, ...).
There are some things I've worked around:
* SMB2_ioctl() explicitely checks for DFS requests and uses the IPC tid
* since the tcon in build_path_from_dentry() does *not* have the
IN_DFS_SHARE flag (I don't know why that is, because it is set in
smbv1) I've added a new version of the function that uses an boolean
argument to control whether or not to prefix the tree name. this
version is only called once in the smb-generic code that deals with
DFS.
You will find more information in the commit messages. Any help
solving these issues is welcome.
Aurelien Aptel (6):
fs/cifs: add smb2 fsctl payloads for DFS resolving
fs/cifs: implement get_dfs_refer for smb2
fs/cifs: always use ipc for DFS resolving ioctls
fs/cifs: add build_path_from_dentry_optional_prefix()
fs/cifs: always use tree name prefix for DFS resolving
fs/cifs: enable get_dfs_refer operation for smb2+
fs/cifs/cifs_dfs_ref.c | 2 +-
fs/cifs/cifsproto.h | 1 +
fs/cifs/dir.c | 12 ++-
fs/cifs/smb2ops.c | 210 +++++++++++++++++++++++++++++++++++++++++++++++++
fs/cifs/smb2pdu.c | 4 +
fs/cifs/smb2pdu.h | 15 ++++
6 files changed, 241 insertions(+), 3 deletions(-)
--
2.1.4
next reply other threads:[~2016-11-08 16:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-08 16:33 Aurelien Aptel [this message]
[not found] ` <1478622806-19636-1-git-send-email-aaptel-IBi9RG/b67k@public.gmane.org>
2016-11-08 16:33 ` [PATCH v1 1/6] fs/cifs: add smb2 fsctl payloads for DFS resolving Aurelien Aptel
2016-11-08 16:33 ` [PATCH v1 2/6] fs/cifs: implement get_dfs_refer for smb2 Aurelien Aptel
[not found] ` <1478622806-19636-3-git-send-email-aaptel-IBi9RG/b67k@public.gmane.org>
2016-11-11 0:42 ` Pavel Shilovsky
2016-11-08 16:33 ` [PATCH v1 3/6] fs/cifs: always use ipc for DFS resolving ioctls Aurelien Aptel
[not found] ` <1478622806-19636-4-git-send-email-aaptel-IBi9RG/b67k@public.gmane.org>
2016-11-11 0:46 ` Pavel Shilovsky
2016-11-08 16:33 ` [PATCH v1 4/6] fs/cifs: add build_path_from_dentry_optional_prefix() Aurelien Aptel
2016-11-08 16:33 ` [PATCH v1 5/6] fs/cifs: always use tree name prefix for DFS resolving Aurelien Aptel
2016-11-08 16:33 ` [PATCH v1 6/6] fs/cifs: enable get_dfs_refer operation for smb2+ Aurelien Aptel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1478622806-19636-1-git-send-email-aaptel@suse.com \
--to=aaptel-ibi9rg/b67k@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.