]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ovl: Fix OVL_XATTR_PREFIX
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 22 Aug 2016 15:59:22 +0000 (17:59 +0200)
committerShan Hai <shan.hai@oracle.com>
Fri, 4 Aug 2017 05:53:22 +0000 (13:53 +0800)
Make sure ovl_own_xattr_handler only matches attribute names starting
with "overlay.", not "overlayXXX".

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Fixes: d837a49bd57f ("ovl: fix POSIX ACL setting")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Shan Hai <shan.hai@oracle.com>
Orabug: 26401569

(backport upstream commit fe2b75952347762a21f67d9df1199137ae5988b2)

Signed-off-by: Shan Hai <shan.hai@oracle.com>
Reviewed-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
fs/overlayfs/inode.c
fs/overlayfs/overlayfs.h

index 3fc2eccf07498c6a989609a7d14617bf2040ad5e..23a6f2f30b39e7a31349933eb0f0dcfca7abec56 100644 (file)
@@ -213,9 +213,8 @@ static int ovl_readlink(struct dentry *dentry, char __user *buf, int bufsiz)
 
 static 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, const char *name,
index d30ca4cf2192e40f20fa1406af478e6f85b17fce..febcfb6b989e5cbbe1a9a32c857b5272db57a8c7 100644 (file)
@@ -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