aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2008-05-14 21:50:56 -0400
committerSteve French <sfrench@us.ibm.com>2008-05-14 21:50:56 -0400
commit646dd539878a194bc14b104621c0b2b33587e40f (patch)
treeba3e9a8a9565e66ea53905b209438fae6d413853 /fs/cifs/connect.c
parent35fc37d5175091c36d034a28c057da0f9594ee7e (diff)
[CIFS] Fix paths when share is in DFS to include proper prefix
Some versions of Samba (3.2-pre e.g.) are stricter about checking to make sure that paths in DFS name spaces are sent in the form \\server\share\dir\subdir ... instead of \dir\subdir Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 7c2e5ea03305..d5747e30f1c9 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1419,27 +1419,6 @@ find_unc(__be32 new_target_ip_addr, char *uncName, char *userName)
1419} 1419}
1420 1420
1421int 1421int
1422connect_to_dfs_path(int xid, struct cifsSesInfo *pSesInfo,
1423 const char *old_path, const struct nls_table *nls_codepage,
1424 int remap)
1425{
1426 struct dfs_info3_param *referrals = NULL;
1427 unsigned int num_referrals;
1428 int rc = 0;
1429
1430 rc = get_dfs_path(xid, pSesInfo, old_path, nls_codepage,
1431 &num_referrals, &referrals, remap);
1432
1433 /* BB Add in code to: if valid refrl, if not ip address contact
1434 the helper that resolves tcp names, mount to it, try to
1435 tcon to it unmount it if fail */
1436
1437 kfree(referrals);
1438
1439 return rc;
1440}
1441
1442int
1443get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path, 1422get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path,
1444 const struct nls_table *nls_codepage, unsigned int *pnum_referrals, 1423 const struct nls_table *nls_codepage, unsigned int *pnum_referrals,
1445 struct dfs_info3_param **preferrals, int remap) 1424 struct dfs_info3_param **preferrals, int remap)
@@ -2161,10 +2140,11 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
2161 if ((strchr(volume_info.UNC + 3, '\\') == NULL) 2140 if ((strchr(volume_info.UNC + 3, '\\') == NULL)
2162 && (strchr(volume_info.UNC + 3, '/') == 2141 && (strchr(volume_info.UNC + 3, '/') ==
2163 NULL)) { 2142 NULL)) {
2164 rc = connect_to_dfs_path(xid, pSesInfo, 2143/* rc = connect_to_dfs_path(xid, pSesInfo,
2165 "", cifs_sb->local_nls, 2144 "", cifs_sb->local_nls,
2166 cifs_sb->mnt_cifs_flags & 2145 cifs_sb->mnt_cifs_flags &
2167 CIFS_MOUNT_MAP_SPECIAL_CHR); 2146 CIFS_MOUNT_MAP_SPECIAL_CHR);*/
2147 cFYI(1, ("DFS root not supported"));
2168 rc = -ENODEV; 2148 rc = -ENODEV;
2169 goto out; 2149 goto out;
2170 } else { 2150 } else {