Commit fe2b7595 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Miklos Szeredi

ovl: Fix OVL_XATTR_PREFIX

Make sure ovl_own_xattr_handler only matches attribute names starting
with "overlay.", not "overlayXXX".
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
Fixes: d837a49b ("ovl: fix POSIX ACL setting")
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent fd36570a
...@@ -194,9 +194,8 @@ static int ovl_readlink(struct dentry *dentry, char __user *buf, int bufsiz) ...@@ -194,9 +194,8 @@ static int ovl_readlink(struct dentry *dentry, char __user *buf, int bufsiz)
bool ovl_is_private_xattr(const char *name) bool ovl_is_private_xattr(const char *name)
{ {
#define OVL_XATTR_PRE_NAME OVL_XATTR_PREFIX "." return strncmp(name, OVL_XATTR_PREFIX,
return strncmp(name, OVL_XATTR_PRE_NAME, sizeof(OVL_XATTR_PREFIX) - 1) == 0;
sizeof(OVL_XATTR_PRE_NAME) - 1) == 0;
} }
int ovl_setxattr(struct dentry *dentry, struct inode *inode, int ovl_setxattr(struct dentry *dentry, struct inode *inode,
......
...@@ -24,8 +24,8 @@ enum ovl_path_type { ...@@ -24,8 +24,8 @@ enum ovl_path_type {
(OVL_TYPE_MERGE(type) || !OVL_TYPE_UPPER(type)) (OVL_TYPE_MERGE(type) || !OVL_TYPE_UPPER(type))
#define OVL_XATTR_PREFIX XATTR_TRUSTED_PREFIX "overlay" #define OVL_XATTR_PREFIX XATTR_TRUSTED_PREFIX "overlay."
#define OVL_XATTR_OPAQUE OVL_XATTR_PREFIX ".opaque" #define OVL_XATTR_OPAQUE OVL_XATTR_PREFIX "opaque"
#define OVL_ISUPPER_MASK 1UL #define OVL_ISUPPER_MASK 1UL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment