xfs: don't return XFS_ATTR_PARENT attributes via listxattr
authorAllison Henderson <allison.henderson@oracle.com>
Mon, 22 Apr 2024 16:47:52 +0000 (09:47 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 23 Apr 2024 14:46:59 +0000 (07:46 -0700)
commitdaf9f884906bcfcffe26967aee9ece893fba019b
tree599137c1bdb19af4295e32489aa7a91402f5f3ae
parent1c12949e50e191933c08758ae53e31b852e730d6
xfs: don't return XFS_ATTR_PARENT attributes via listxattr

Parent pointers are internal filesystem metadata.  They're not intended
to be directly visible to userspace, so filter them out of
xfs_xattr_put_listent so that they don't appear in listxattr.

Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
Inspired-by: Andrey Albershteyn <aalbersh@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
[djwong: change this to XFS_ATTR_PRIVATE_NSP_MASK per fsverity patchset]
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_da_format.h
fs/xfs/xfs_xattr.c