]> git.hungrycats.org Git - linux/commit
smb: client: use actual path when queryfs
authorwangrong <wangrong@uniontech.com>
Thu, 20 Jun 2024 08:37:29 +0000 (16:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 10:01:02 +0000 (12:01 +0200)
commit51cf4e5ad1347291107f565e04bee9f5b25e943f
tree14102099e46ea7cf5a965061e1e4a259d13c3d27
parent3dd3b564535c5e3498bb9d2238717fc55f85db69
smb: client: use actual path when queryfs

commit a421e3fe0e6abe27395078f4f0cec5daf466caea upstream.

Due to server permission control, the client does not have access to
the shared root directory, but can access subdirectories normally, so
users usually mount the shared subdirectories directly. In this case,
queryfs should use the actual path instead of the root directory to
avoid the call returning an error (EACCES).

Signed-off-by: wangrong <wangrong@uniontech.com>
Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/client/cifsfs.c
fs/smb/client/cifsglob.h
fs/smb/client/smb1ops.c
fs/smb/client/smb2ops.c