From 9dfece3a71c53f4861ea2e9419ce47f8e03fb86c Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Wed, 15 Aug 2012 17:27:52 +0200 Subject: fuse: have setxattr on geo-rep related xattrs take effect From upstream commit 6e3244a131b6d25141bef0cbc59968d3271f8ea3: > In http://review.gluster.com/3687 setxattr was made to a noop for > geo-rep special clients, with the exception of some special ones, > relevant to geo-rep. These exceptions were all in trusted namespace. > > That's no good, because with a mountbroker (unprivileged) setup, > the relevant attributes are in system namespace. So here we > just let setxattr through for any geo-rep related xattr, regardless > of namespace. > > Change-Id: I261141293b7db955a2e8b2405b4510cb10a42694 > BUG: 848447 > Signed-off-by: Csaba Henk > Reviewed-on: http://review.gluster.com/3821 > Tested-by: Gluster Build System > Reviewed-by: Venky Shankar > Reviewed-by: Anand Avati BUG: 883827 Change-Id: I86a044d52ad3e679b21ff3832ee6536c5c6809fb Signed-off-by: Niels de Vos Reviewed-on: https://code.engineering.redhat.com/gerrit/1925 Reviewed-by: Vijay Bellur Tested-by: Vijay Bellur --- xlators/mount/fuse/src/fuse-helpers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators') diff --git a/xlators/mount/fuse/src/fuse-helpers.c b/xlators/mount/fuse/src/fuse-helpers.c index c582291a1d8..fb6acb1abdd 100644 --- a/xlators/mount/fuse/src/fuse-helpers.c +++ b/xlators/mount/fuse/src/fuse-helpers.c @@ -584,10 +584,10 @@ fuse_ignore_xattr_set (fuse_private_t *priv, char *key) goto out; /* trusted NS check */ - if (!((fnmatch (PRIV_XA_NS".glusterfs.*.xtime", key, FNM_PERIOD) == 0) - || (fnmatch (PRIV_XA_NS".glusterfs.volume-mark", + if (!((fnmatch ("*.glusterfs.*.xtime", key, FNM_PERIOD) == 0) + || (fnmatch ("*.glusterfs.volume-mark", key, FNM_PERIOD) == 0) - || (fnmatch (PRIV_XA_NS".glusterfs.volume-mark.*", + || (fnmatch ("*.glusterfs.volume-mark.*", key, FNM_PERIOD) == 0))) ret = -1; -- cgit