]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
fs/cifs: don't translate SFM_SLASH (U+F026) to backslash
authorJon Kuhn <jkuhn@barracuda.com>
Mon, 9 Jul 2018 14:33:14 +0000 (14:33 +0000)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:52:06 +0000 (19:52 -0600)
commit11ea78ec5f821ce1bf11580187a8050a57322685
tree0d5cd71f139798354c5ba7ac570a2f307dabd57e
parent053fbf6734607c65a2af1584188005c4a305ae4f
fs/cifs: don't translate SFM_SLASH (U+F026) to backslash

BugLink: https://bugs.launchpad.net/bugs/1836426
[ Upstream commit c15e3f19a6d5c89b1209dc94b40e568177cb0921 ]

When a Mac client saves an item containing a backslash to a file server
the backslash is represented in the CIFS/SMB protocol as as U+F026.
Before this change, listing a directory containing an item with a
backslash in its name will return that item with the backslash
represented with a true backslash character (U+005C) because
convert_sfm_character mapped U+F026 to U+005C when interpretting the
CIFS/SMB protocol response.  However, attempting to open or stat the
path using a true backslash will result in an error because
convert_to_sfm_char does not map U+005C back to U+F026 causing the
CIFS/SMB request to be made with the backslash represented as U+005C.

This change simply prevents the U+F026 to U+005C conversion from
happenning.  This is analogous to how the code does not do any
translation of UNI_SLASH (U+F000).

Signed-off-by: Jon Kuhn <jkuhn@barracuda.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/cifs/cifs_unicode.c