1 From 1daaae8fa4afe3df78ca34e724ed7e8187e4eb32 Mon Sep 17 00:00:00 2001
2 From: Jeff Layton <jlayton@redhat.com>
3 Date: Wed, 21 Mar 2012 06:30:40 -0400
4 Subject: cifs: fix issue mounting of DFS ROOT when redirecting from one domain controller to the next
6 From: Jeff Layton <jlayton@redhat.com>
8 commit 1daaae8fa4afe3df78ca34e724ed7e8187e4eb32 upstream.
10 This patch fixes an issue when cifs_mount receives a
11 STATUS_BAD_NETWORK_NAME error during cifs_get_tcon but is able to
12 continue after an DFS ROOT referral. In this case, the return code
13 variable is not reset prior to trying to mount from the system referred
14 to. Thus, is_path_accessible is not executed and the final DFS referral
15 is not performed causing a mount error.
17 Use case: In DNS, example.com resolves to the secondary AD server
18 ad2.example.com Our primary domain controller is ad1.example.com and has
19 a DFS redirection set up from \\ad1\share\Users to \\files\share\Users.
20 Mounting \\example.com\share\Users fails.
22 Regression introduced by commit 724d9f1.
24 Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru
25 Signed-off-by: Thomas Hadig <thomas@intapp.com>
26 Signed-off-by: Jeff Layton <jlayton@redhat.com>
27 Signed-off-by: Steve French <sfrench@us.ibm.com>
28 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31 fs/cifs/connect.c | 3 ++-
32 1 file changed, 2 insertions(+), 1 deletion(-)
34 --- a/fs/cifs/connect.c
35 +++ b/fs/cifs/connect.c
36 @@ -3368,7 +3368,7 @@ cifs_ra_pages(struct cifs_sb_info *cifs_
38 cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info)
43 struct cifs_ses *pSesInfo;
44 struct cifs_tcon *tcon;
45 @@ -3395,6 +3395,7 @@ try_mount_again: