OpenCloudOS-Kernel/fs/smb/client
Paulo Alcantara df32e887d3 smb: client: set correct file type from NFS reparse points
[ Upstream commit 45e724022e2704b5a5193fd96f378822b0448e07 ]

Handle all file types in NFS reparse points as specified in MS-FSCC
2.1.2.6 Network File System (NFS) Reparse Data Buffer.

The client is now able to set all file types based on the parsed NFS
reparse point, which used to support only symlinks.  This works for
SMB1+.

Before patch:

$ mount.cifs //srv/share /mnt -o ...
$ ls -l /mnt
ls: cannot access 'block': Operation not supported
ls: cannot access 'char': Operation not supported
ls: cannot access 'fifo': Operation not supported
ls: cannot access 'sock': Operation not supported
total 1
l????????? ? ?    ?    ?            ? block
l????????? ? ?    ?    ?            ? char
-rwxr-xr-x 1 root root 5 Nov 18 23:22 f0
l????????? ? ?    ?    ?            ? fifo
l--------- 1 root root 0 Nov 18 23:23 link -> f0
l????????? ? ?    ?    ?            ? sock

After patch:

$ mount.cifs //srv/share /mnt -o ...
$ ls -l /mnt
total 1
brwxr-xr-x 1 root root  123,  123 Nov 18 00:34 block
crwxr-xr-x 1 root root 1234, 1234 Nov 18 00:33 char
-rwxr-xr-x 1 root root          5 Nov 18 23:22 f0
prwxr-xr-x 1 root root          0 Nov 18 23:23 fifo
lrwxr-xr-x 1 root root          0 Nov 18 23:23 link -> f0
srwxr-xr-x 1 root root          0 Nov 19  2023 sock

Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-20 17:02:00 +01:00
..
Kconfig fs/smb/client: Use common code in client 2023-08-30 08:55:52 -05:00
Makefile smb: client: get rid of dfs code dep in namespace.c 2023-08-20 16:05:50 -05:00
asn1.c
cached_dir.c smb: client: fix use-after-free in smb2_query_info_compound() 2023-11-28 17:20:09 +00:00
cached_dir.h smb: client: make laundromat a delayed worker 2023-10-12 09:41:04 -05:00
cifs_debug.c cifs: distribute channels across interfaces based on speed 2023-12-03 07:33:08 +01:00
cifs_debug.h
cifs_fs_sb.h
cifs_ioctl.h smb3: allow dumping session and tcon id to improve stats analysis and debugging 2023-11-28 17:20:09 +00:00
cifs_spnego.c cifs: spnego: add ';' in HOST_KEY_LEN 2023-11-28 17:19:54 +00:00
cifs_spnego.h
cifs_spnego_negtokeninit.asn1
cifs_swn.c
cifs_swn.h
cifs_unicode.c fs/smb/client: Use common code in client 2023-08-30 08:55:52 -05:00
cifs_unicode.h fs/smb/client: Use common code in client 2023-08-30 08:55:52 -05:00
cifsacl.c
cifsacl.h
cifsencrypt.c
cifsfs.c cifs: Fix flushing, invalidation and file size with FICLONE 2023-12-13 18:45:34 +01:00
cifsfs.h cifs: update internal module version number for cifs.ko 2023-09-07 00:06:04 -05:00
cifsglob.h smb: client: set correct file type from NFS reparse points 2023-12-20 17:02:00 +01:00
cifspdu.h smb: client: set correct file type from NFS reparse points 2023-12-20 17:02:00 +01:00
cifsproto.h smb: client: set correct file type from NFS reparse points 2023-12-20 17:02:00 +01:00
cifsroot.c
cifssmb.c smb: client: implement ->query_reparse_point() for SMB1 2023-12-20 17:02:00 +01:00
connect.c cifs: fix leak of iface for primary channel 2023-12-03 07:33:09 +01:00
dfs.c smb: client: fix mount when dns_resolver key is not available 2023-11-28 17:20:09 +00:00
dfs.h smb: client: get rid of dfs code dep in namespace.c 2023-08-20 16:05:50 -05:00
dfs_cache.c smb: client: ensure to try all targets when finding nested links 2023-08-20 16:05:50 -05:00
dfs_cache.h smb: client: ensure to try all targets when finding nested links 2023-08-20 16:05:50 -05:00
dir.c smb: client: get rid of dfs naming in automount code 2023-08-20 16:05:50 -05:00
dns_resolve.c
dns_resolve.h
export.c
file.c v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
fs_context.c fs/smb/client: Reset password pointer to NULL 2023-09-28 14:49:51 -05:00
fs_context.h smb: client: fix mount when dns_resolver key is not available 2023-11-28 17:20:09 +00:00
fscache.c smb: propagate error code of extract_sharename() 2023-08-30 23:38:49 -05:00
fscache.h smb: convert to ctime accessor functions 2023-07-24 10:30:05 +02:00
inode.c smb: client: set correct file type from NFS reparse points 2023-12-20 17:02:00 +01:00
ioctl.c smb3: allow dumping session and tcon id to improve stats analysis and debugging 2023-11-28 17:20:09 +00:00
link.c
misc.c smb3: do not start laundromat thread when dir leases 2023-09-19 13:32:02 -05:00
namespace.c smb: client: fix mount when dns_resolver key is not available 2023-11-28 17:20:09 +00:00
netlink.c
netlink.h
netmisc.c
nterr.c
nterr.h
ntlmssp.h
readdir.c smb: client: set correct file type from NFS reparse points 2023-12-20 17:02:00 +01:00
rfc1002pdu.h
sess.c cifs: account for primary channel in the interface list 2023-12-03 07:33:09 +01:00
smb1ops.c smb: client: set correct file type from NFS reparse points 2023-12-20 17:02:00 +01:00
smb2file.c
smb2glob.h
smb2inode.c smb: client: set correct file type from NFS reparse points 2023-12-20 17:02:00 +01:00
smb2maperror.c smb3: remove duplicate error mapping 2023-09-20 16:04:51 -05:00
smb2misc.c smb: client: fix potential deadlock when releasing mids 2023-11-28 17:20:09 +00:00
smb2ops.c smb: client: set correct file type from NFS reparse points 2023-12-20 17:02:00 +01:00
smb2pdu.c smb3: fix confusing debug message 2023-09-20 19:50:05 -05:00
smb2pdu.h
smb2proto.h smb: client: move some params to cifs_open_info_data 2023-08-20 16:05:50 -05:00
smb2status.h
smb2transport.c cifs: fix check of rc in function generate_smb3signingkey 2023-11-28 17:19:54 +00:00
smbdirect.c smb3: Add dynamic trace points for RDMA (smbdirect) reconnect 2023-09-19 11:03:24 -05:00
smbdirect.h
smbencrypt.c
smberr.h
trace.c
trace.h smb3: Add dynamic trace points for RDMA (smbdirect) reconnect 2023-09-19 11:03:24 -05:00
transport.c smb: client: fix potential deadlock when releasing mids 2023-11-28 17:20:09 +00:00
unc.c
winucase.c
xattr.c smb3: fix caching of ctime on setxattr 2023-11-28 17:20:09 +00:00