summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2012-08-15 17:27:52 +0200
committerVijay Bellur <vbellur@redhat.com>2012-12-17 12:37:35 -0500
commit9dfece3a71c53f4861ea2e9419ce47f8e03fb86c (patch)
tree51f86096579dbc16bc34a92f3de1419b7552e565
parent72237352cca4542c0d3b6f6a9276c962b33780d9 (diff)
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 <csaba@redhat.com> > Reviewed-on: http://review.gluster.com/3821 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Venky Shankar <vshankar@redhat.com> > Reviewed-by: Anand Avati <avati@redhat.com> BUG: 883827 Change-Id: I86a044d52ad3e679b21ff3832ee6536c5c6809fb Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1925 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--xlators/mount/fuse/src/fuse-helpers.c6
1 files changed, 3 insertions, 3 deletions
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;