提交 c1508ca2 编写于 作者: S Sean Finney 提交者: Steve French

cifs: Add support for mounting Windows 2008 DFS shares

Windows 2008 CIFS servers do not always return PATH_NOT_COVERED when
attempting to access a DFS share.  Therefore, when checking for remote
shares, unconditionally ask for a DFS referral for the UNC (w/out prepath)
before continuing with previous behavior of attempting to access the UNC +
prepath and checking for PATH_NOT_COVERED.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=31092Reviewed-by: NJeff Layton <jlayton@redhat.com>
Signed-off-by: NSean Finney <seanius@seanius.net>
Signed-off-by: NPavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: NSteve French <sfrench@us.ibm.com>
上级 dd613945
...@@ -2937,6 +2937,24 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, ...@@ -2937,6 +2937,24 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
(tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE)); (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE));
remote_path_check: remote_path_check:
#ifdef CONFIG_CIFS_DFS_UPCALL
/*
* Perform an unconditional check for whether there are DFS
* referrals for this path without prefix, to provide support
* for DFS referrals from w2k8 servers which don't seem to respond
* with PATH_NOT_COVERED to requests that include the prefix.
* Chase the referral if found, otherwise continue normally.
*/
if (referral_walks_count == 0) {
int refrc = expand_dfs_referral(xid, pSesInfo, volume_info,
cifs_sb, &mount_data, false);
if (!refrc) {
referral_walks_count++;
goto try_mount_again;
}
}
#endif
/* check if a whole path (including prepath) is not remote */ /* check if a whole path (including prepath) is not remote */
if (!rc && tcon) { if (!rc && tcon) {
/* build_path_to_root works only when we have a valid tcon */ /* build_path_to_root works only when we have a valid tcon */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册