]> git.itanic.dy.fi Git - linux-stable/commit
cifs: mapchars mount option ignored
authorSteve French <stfrench@microsoft.com>
Wed, 24 May 2023 08:26:19 +0000 (03:26 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 May 2023 13:17:25 +0000 (14:17 +0100)
commit37efef60f9f10c69add7ceb0aaacab77f4b9429c
tree9b875958a7f178f8d533a3e1b965310dd3c6dc6a
parentae68c0f7edbc9a294094ce03a0aaf45aa489ce40
cifs: mapchars mount option ignored

commit cb8b02fd6343228966324528adf920bfb8b8e681 upstream.

There are two ways that special characters (not allowed in some
other operating systems like Windows, but allowed in POSIX) have
been mapped in the past ("SFU" and "SFM" mappings) to allow them
to be stored in a range reserved for special chars. The default
for Linux has been to use "mapposix" (ie the SFM mapping) but
the conversion to the new mount API in the 5.11 kernel broke
the ability to override the default mapping of the reserved
characters (like '?' and '*' and '\') via "mapchars" mount option.

This patch fixes that - so can now mount with "mapchars"
mount option to override the default ("mapposix" ie SFM) mapping.

Reported-by: Tyler Spivey <tspivey8@gmail.com>
Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api")
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/fs_context.c