summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorJon Kuhn <jkuhn@barracuda.com>2018-07-09 14:33:14 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-10 08:55:55 +0200
commit05166cf09a6e71a7dcda746294e138957f5a93c0 (patch)
tree28492461ea677f507501cb451c35a9cf9a1634e3 /fs/cifs
parent43160392b3eb437934e1e193e2097562f1b7d222 (diff)
downloadlinux-stable-05166cf09a6e71a7dcda746294e138957f5a93c0.tar.gz
linux-stable-05166cf09a6e71a7dcda746294e138957f5a93c0.tar.bz2
linux-stable-05166cf09a6e71a7dcda746294e138957f5a93c0.zip
fs/cifs: don't translate SFM_SLASH (U+F026) to backslash
[ 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>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifs_unicode.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c
index b380e0871372..a2b2355e7f01 100644
--- a/fs/cifs/cifs_unicode.c
+++ b/fs/cifs/cifs_unicode.c
@@ -105,9 +105,6 @@ convert_sfm_char(const __u16 src_char, char *target)
case SFM_LESSTHAN:
*target = '<';
break;
- case SFM_SLASH:
- *target = '\\';
- break;
case SFM_SPACE:
*target = ' ';
break;