Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Paulo Alcantara (SUSE) and committed by
Steve French
15425523 fc513fac

+2
+2
fs/cifs/cifs_dfs_ref.c
··· 324 324 if (full_path == NULL) 325 325 goto cdda_exit; 326 326 327 + convert_delimiter(full_path, '\\'); 328 + 327 329 cifs_dbg(FYI, "%s: full_path: %s\n", __func__, full_path); 328 330 329 331 if (!cifs_sb_master_tlink(cifs_sb)) {