linux_dsm_epyc7002/fs/afs
David Howells 64195f022a 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: ae46578b96 ("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-03-25 09:04:07 +01:00
..
addr_list.c
afs_cm.h
afs_fs.h
afs_vl.h
afs.h
cache.c
callback.c
cell.c
cmservice.c
dir_edit.c afs: Fix to take ref on page when PG_private is set 2020-10-29 13:53:04 +00:00
dir_silly.c
dir.c afs: Stop listxattr() from listing "afs.*" attributes 2021-03-25 09:04:07 +01:00
dynroot.c
file.c afs: Stop listxattr() from listing "afs.*" attributes 2021-03-25 09:04:07 +01:00
flock.c
fs_operation.c afs: Fix accessing YFS xattrs on a non-YFS server 2021-03-25 09:04:07 +01:00
fs_probe.c
fsclient.c
inode.c afs: Stop listxattr() from listing "afs.*" attributes 2021-03-25 09:04:07 +01:00
internal.h afs: Stop listxattr() from listing "afs.*" attributes 2021-03-25 09:04:07 +01:00
Kconfig
main.c rxrpc: Fix deadlock around release of dst cached on udp tunnel 2021-02-10 09:29:13 +01:00
Makefile
misc.c
mntpt.c afs: Stop listxattr() from listing "afs.*" attributes 2021-03-25 09:04:07 +01:00
proc.c
protocol_uae.h
protocol_yfs.h
rotate.c
rxrpc.c
security.c
server_list.c
server.c
super.c afs: Fix memory leak when mounting with multiple source parameters 2020-12-08 15:59:25 -08:00
vl_alias.c
vl_list.c
vl_probe.c
vl_rotate.c
vlclient.c
volume.c
write.c afs: Fix afs_write_end() when called with copied == 0 [ver #3] 2020-11-14 11:51:18 -08:00
xattr.c afs: Stop listxattr() from listing "afs.*" attributes 2021-03-25 09:04:07 +01:00
xdr_fs.h
yfsclient.c afs: Fix warning due to unadvanced marshalling pointer 2020-11-03 09:53:40 -08:00