summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorVenky Shankar <venky@gluster.com>2011-10-05 16:56:30 +0530
committerVijay Bellur <vijay@gluster.com>2011-10-28 08:08:40 -0700
commita29f1a0e36bde5ca7b8f3762f10b210b5e12a875 (patch)
treee44c9bd019796c61e7f7059f34f40de0f984b5c7 /xlators/mgmt
parentaf708e9fc2eb2104b9e8e3b5a3eaf99201664324 (diff)
fuse: flip xattr key from user to trusted namespace for certain
clients. This is needed for gsyncd/hadoop-plugin running as non-super user to be able to request extended attributes under trusted namespace. Request for a key is made under 'user.' namespace and is flipped by fuse xlator for specific xattr name to the corresponding 'trusted.' extended attribute. Both applications set a identifier (client-pid) while doing a FUSE mount, which is checked by get/set/remove interfaces in FUSE translator. Change-Id: I72f77a5dd1ee1d69c8b0e09209449348dbcf879a BUG: 3701 Reviewed-on: http://review.gluster.com/563 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-mountbroker.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-mountbroker.c b/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
index f847298c7..b00145f8c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
+++ b/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
@@ -268,7 +268,7 @@ const char *georep_mnt_desc_template =
"SUP("
"xlator-option=\\*-dht.assert-no-child-down=true "
"volfile-server=localhost "
- "client-pid=-1 "
+ "client-pid=%d "
"volfile-id=%s "
"user-map-root=%s "
")"
@@ -280,6 +280,7 @@ const char *georep_mnt_desc_template =
const char *hadoop_mnt_desc_template =
"SUP("
"volfile-server=%s "
+ "client-pid=%d "
"volfile-id=%s "
"user-map-root=%s "
")"
@@ -296,7 +297,7 @@ make_georep_mountspec (gf_mount_spec_t *mspec, const char *volname,
int ret = 0;
ret = gf_asprintf (&georep_mnt_desc, georep_mnt_desc_template,
- volname, user);
+ GF_CLIENT_PID_GSYNCD, volname, user);
if (ret == -1)
return ret;
@@ -311,7 +312,7 @@ make_ghadoop_mountspec (gf_mount_spec_t *mspec, const char *volname,
int ret = 0;
ret = gf_asprintf (&hadoop_mnt_desc, hadoop_mnt_desc_template,
- server, volname, user);
+ server, GF_CLIENT_PID_HADOOP, volname, user);
if (ret == -1)
return ret;