aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeth Forshee (DigitalOcean) <sforshee@kernel.org>2023-10-11 07:50:06 -0500
committerSeth Forshee (DigitalOcean) <sforshee@kernel.org>2024-04-19 11:09:29 -0500
commit9015f0a98c952d50be0e5a6f00887f7924ef6c04 (patch)
tree16f08a5a1a5c53fddfcf52e8d262c16daff6d90c
parent09075026c320f80f270532f8a3ad23a8a3c8a9a1 (diff)
downloadlinux-fscaps-vfsid.tar.gz
vfs: forbid using xattr interfaces for fscapsfscaps-vfsid
All relevant filesystems now handle fscaps via the type-safe inode operations, and all code has been updated to use the new vfs-level fscaps interfaces instead of xattr interfaces. We can now block any use of the vfs xattr interfaces for passing raw fscaps xattrs to filesystems to enforce use of the new interfaces. Signed-off-by: Seth Forshee (DigitalOcean) <sforshee@kernel.org>
-rw-r--r--fs/xattr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xattr.c b/fs/xattr.c
index 213dffe579a387..16f5e03ed50fd9 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -415,7 +415,7 @@ __vfs_setxattr(struct mnt_idmap *idmap, struct dentry *dentry,
{
const struct xattr_handler *handler;
- if (is_posix_acl_xattr(name))
+ if (is_posix_acl_xattr(name) || is_fscaps_xattr(name))
return -EOPNOTSUPP;
handler = xattr_resolve_name(inode, &name);
@@ -633,7 +633,7 @@ __vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name,
{
const struct xattr_handler *handler;
- if (is_posix_acl_xattr(name))
+ if (is_posix_acl_xattr(name) || is_fscaps_xattr(name))
return -EOPNOTSUPP;
handler = xattr_resolve_name(inode, &name);
@@ -728,7 +728,7 @@ __vfs_removexattr(struct mnt_idmap *idmap, struct dentry *dentry,
struct inode *inode = d_inode(dentry);
const struct xattr_handler *handler;
- if (is_posix_acl_xattr(name))
+ if (is_posix_acl_xattr(name) || is_fscaps_xattr(name))
return -EOPNOTSUPP;
handler = xattr_resolve_name(inode, &name);