TencentOS-kernel/fs/afs
David Howells d699a3dc61 afs: Stop listxattr() from listing "afs.*" attributes
commit a7889c6320b9200e3fe415238f546db677310fa9 upstream.

afs_listxattr() lists all the available special afs xattrs (i.e. those in
the "afs.*" space), no matter what type of server we're dealing with.  But
OpenAFS servers, for example, cannot deal with some of the extra-capable
attributes that AuriStor (YFS) servers provide.  Unfortunately, the
presence of the afs.yfs.* attributes causes errors[1] for anything that
tries to read them if the server is of the wrong type.

Fix the problem by removing afs_listxattr() so that none of the special
xattrs are listed (AFS doesn't support xattrs).  It does mean, however,
that getfattr won't list them, though they can still be accessed with
getxattr() and setxattr().

This can be tested with something like:

	getfattr -d -m ".*" /afs/example.com/path/to/file

With this change, none of the afs.* attributes should be visible.

Changes:
ver #2:
 - Hide all of the afs.* xattrs, not just the ACL ones.

Fixes: ae46578b963f ("afs: Get YFS ACLs and information through xattrs")
Reported-by: Gaja Sophie Peters <gaja.peters@math.uni-hamburg.de>
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Gaja Sophie Peters <gaja.peters@math.uni-hamburg.de>
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
Reviewed-by: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003502.html [1]
Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003567.html # v1
Link: http://lists.infradead.org/pipermail/linux-afs/2021-March/003573.html # v2
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 12:53:16 +08:00
..
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
addr_list.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
afs.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
afs_cm.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
afs_fs.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
afs_vl.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
cache.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
callback.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
cell.c afs: Fix storage of cell names 2021-03-16 16:31:03 +08:00
cmservice.c afs: Fix to actually set AFS_SERVER_FL_HAVE_EPOCH 2021-03-16 16:27:06 +08:00
dir.c afs: Stop listxattr() from listing "afs.*" attributes 2021-04-12 12:53:16 +08:00
dir_edit.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
dir_silly.c afs: Fix race between post-modification dir edit and readdir/d_revalidate 2021-03-16 16:26:31 +08:00
dynroot.c afs: Fix NULL deref in afs_dynroot_depopulate() 2021-03-16 16:34:40 +08:00
file.c afs: Stop listxattr() from listing "afs.*" attributes 2021-04-12 12:53:16 +08:00
flock.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
fs_probe.c rxrpc: Make rxrpc_kernel_get_srtt() indicate validity 2021-03-16 16:35:28 +08:00
fsclient.c afs: Set error flag rather than return error from file status decode 2021-03-16 16:30:38 +08:00
inode.c afs: Stop listxattr() from listing "afs.*" attributes 2021-04-12 12:53:16 +08:00
internal.h afs: Stop listxattr() from listing "afs.*" attributes 2021-04-12 12:53:16 +08:00
main.c rxrpc: Fix deadlock around release of dst cached on udp tunnel 2021-04-12 12:51:53 +08:00
misc.c afs: Fix the mapping of the UAEOVERFLOW abort code 2021-03-16 16:30:38 +08:00
mntpt.c afs: Stop listxattr() from listing "afs.*" attributes 2021-04-12 12:53:16 +08:00
proc.c afs: Fix memory leak in afs_put_sysnames() 2021-03-16 16:30:33 +08:00
protocol_uae.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
protocol_yfs.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
rotate.c afs: Make record checking use TASK_UNINTERRUPTIBLE when appropriate 2021-03-16 16:27:06 +08:00
rxrpc.c afs: Set error flag rather than return error from file status decode 2021-03-16 16:30:38 +08:00
security.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
server.c afs: Make record checking use TASK_UNINTERRUPTIBLE when appropriate 2021-03-16 16:27:06 +08:00
server_list.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
super.c afs: Fix memory leak when mounting with multiple source parameters 2021-03-16 16:42:27 +08:00
vl_list.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
vl_probe.c rxrpc: Make rxrpc_kernel_get_srtt() indicate validity 2021-03-16 16:35:28 +08:00
vl_rotate.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
vlclient.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
volume.c afs: Make record checking use TASK_UNINTERRUPTIBLE when appropriate 2021-03-16 16:27:06 +08:00
write.c afs: afs_write_end() should change i_size under the right lock 2021-03-16 16:30:37 +08:00
xattr.c afs: Stop listxattr() from listing "afs.*" attributes 2021-04-12 12:53:16 +08:00
xdr_fs.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
yfsclient.c afs: Fix warning due to unadvanced marshalling pointer 2021-03-16 16:40:37 +08:00