Commit d3a49f60 authored by Pali Rohár's avatar Pali Rohár Committed by Steve French

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: d5ecebc4 ("smb3: Allow query of symlinks stored as reparse points")
Acked-by: default avatarPaulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: default avatarPali Rohár <pali@kernel.org>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 556ac52b
...@@ -347,7 +347,6 @@ static int parse_reparse_posix(struct reparse_posix_data *buf, ...@@ -347,7 +347,6 @@ static int parse_reparse_posix(struct reparse_posix_data *buf,
cifs_sb->local_nls); cifs_sb->local_nls);
if (!data->symlink_target) if (!data->symlink_target)
return -ENOMEM; return -ENOMEM;
convert_delimiter(data->symlink_target, '/');
cifs_dbg(FYI, "%s: target path: %s\n", cifs_dbg(FYI, "%s: target path: %s\n",
__func__, data->symlink_target); __func__, data->symlink_target);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment