]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
smb3: fix corrupt path in subdirs on smb311 with posix
authorSteve French <stfrench@microsoft.com>
Fri, 15 Jun 2018 03:30:56 +0000 (22:30 -0500)
committerSteve French <stfrench@microsoft.com>
Fri, 15 Jun 2018 07:38:08 +0000 (02:38 -0500)
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2misc.c

index 0de87ca33e2e2cc8192a94475aecd4b9c5f5a064..3ff7cec2da81141f67482c57ab03de52aed855ba 100644 (file)
@@ -454,7 +454,8 @@ cifs_convert_path_to_utf16(const char *from, struct cifs_sb_info *cifs_sb)
 #ifdef CONFIG_CIFS_SMB311
        /* SMB311 POSIX extensions paths do not include leading slash */
        else if (cifs_sb_master_tlink(cifs_sb) &&
-                cifs_sb_master_tcon(cifs_sb)->posix_extensions) {
+                cifs_sb_master_tcon(cifs_sb)->posix_extensions &&
+                (from[0] == '/')) {
                start_of_path = from + 1;
        }
 #endif /* 311 */