]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Convert trailing spaces and periods in path components
authorBoris Protopopov <pboris@amazon.com>
Thu, 24 Sep 2020 00:36:38 +0000 (00:36 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 17:25:04 +0000 (18:25 +0100)
commit4000c1b820087964a8c68cf7d5de71036f962107
tree01af14fa2dac7b753143a8af02895b800a29cdec
parent428f824e9df4888836e9a3f2d132cbf10783e61a
Convert trailing spaces and periods in path components

commit 57c176074057531b249cf522d90c22313fa74b0b upstream.

When converting trailing spaces and periods in paths, do so
for every component of the path, not just the last component.
If the conversion is not done for every path component, then
subsequent operations in directories with trailing spaces or
periods (e.g. create(), mkdir()) will fail with ENOENT. This
is because on the server, the directory will have a special
symbol in its name, and the client needs to provide the same.

Signed-off-by: Boris Protopopov <pboris@amazon.com>
Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/cifs_unicode.c