Skip to content

Commit

Permalink
ovl: Fix OVL_XATTR_PREFIX
Browse files Browse the repository at this point in the history
Make sure ovl_own_xattr_handler only matches attribute names starting
with "overlay.", not "overlayXXX".

Signed-off-by: Andreas Gruenbacher <[email protected]>
Fixes: d837a49 ("ovl: fix POSIX ACL setting")
Signed-off-by: Miklos Szeredi <[email protected]>
  • Loading branch information
Andreas Gruenbacher authored and Miklos Szeredi committed Sep 1, 2016
1 parent fd36570 commit fe2b759
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions fs/overlayfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,8 @@ static int ovl_readlink(struct dentry *dentry, char __user *buf, int bufsiz)

bool ovl_is_private_xattr(const char *name)
{
#define OVL_XATTR_PRE_NAME OVL_XATTR_PREFIX "."
return strncmp(name, OVL_XATTR_PRE_NAME,
sizeof(OVL_XATTR_PRE_NAME) - 1) == 0;
return strncmp(name, OVL_XATTR_PREFIX,
sizeof(OVL_XATTR_PREFIX) - 1) == 0;
}

int ovl_setxattr(struct dentry *dentry, struct inode *inode,
Expand Down
4 changes: 2 additions & 2 deletions fs/overlayfs/overlayfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ enum ovl_path_type {
(OVL_TYPE_MERGE(type) || !OVL_TYPE_UPPER(type))


#define OVL_XATTR_PREFIX XATTR_TRUSTED_PREFIX "overlay"
#define OVL_XATTR_OPAQUE OVL_XATTR_PREFIX ".opaque"
#define OVL_XATTR_PREFIX XATTR_TRUSTED_PREFIX "overlay."
#define OVL_XATTR_OPAQUE OVL_XATTR_PREFIX "opaque"

#define OVL_ISUPPER_MASK 1UL

Expand Down

0 comments on commit fe2b759

Please sign in to comment.