Skip to content

Commit 1542552

Browse files
Paulo Alcantara (SUSE)smfrench
authored andcommitted
cifs: fix potential mismatch of UNC paths
Ensure that full_path is an UNC path that contains '\\' as delimiter, which is required by cifs_build_devname(). The build_path_from_dentry_optional_prefix() function may return a path with '/' as delimiter when using SMB1 UNIX extensions, for example. Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Signed-off-by: Steve French <stfrench@microsoft.com> Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
1 parent fc513fa commit 1542552

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

fs/cifs/cifs_dfs_ref.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ static struct vfsmount *cifs_dfs_do_automount(struct dentry *mntpt)
324324
if (full_path == NULL)
325325
goto cdda_exit;
326326

327+
convert_delimiter(full_path, '\\');
328+
327329
cifs_dbg(FYI, "%s: full_path: %s\n", __func__, full_path);
328330

329331
if (!cifs_sb_master_tlink(cifs_sb)) {

0 commit comments

Comments
 (0)