]> git.dujemihanovic.xyz Git - linux.git/commit
cifs: Do not convert delimiter when parsing NFS-style symlinks
authorPali Rohár <pali@kernel.org>
Sat, 28 Sep 2024 21:59:46 +0000 (23:59 +0200)
committerSteve French <stfrench@microsoft.com>
Thu, 3 Oct 2024 17:06:36 +0000 (12:06 -0500)
commitd3a49f60917323228f8fdeee313260ef14f94df7
treeea82fc5edb6230653502c4cf0245286df0d859ca
parent556ac52bb1e76cc28fd30aa117b42989965b3efd
cifs: Do not convert delimiter when parsing NFS-style symlinks

NFS-style symlinks have target location always stored in NFS/UNIX form
where backslash means the real UNIX backslash and not the SMB path
separator.

So do not mangle slash and backslash content of NFS-style symlink during
readlink() syscall as it is already in the correct Linux form.

This fixes interoperability of NFS-style symlinks with backslashes created
by Linux NFS3 client throw Windows NFS server and retrieved by Linux SMB
client throw Windows SMB server, where both Windows servers exports the
same directory.

Fixes: d5ecebc4900d ("smb3: Allow query of symlinks stored as reparse points")
Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/reparse.c