summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2013-12-23 12:53:32 +0100
committerVijay Bellur <vbellur@redhat.com>2013-12-30 19:49:43 -0800
commit7e3dd526c62b3a1bb59945efdfed2c2fbbcf9cf9 (patch)
tree69088ce06313f6b03b9ff48a21eb4e0d568b8cb1 /xlators/mgmt
parentd85726d19432384e2c3dd6ceff4b7b4ec3f8f57a (diff)
rpc/server: add anonuid and anongid options for root-squash
Introduce new options to modify the behaviour of server.root-squash. With server.anonuid and server.anongid the uid/gid can be specified and the root user (uid=0 and gid=0) will be mapped to the given uid/gid instead of nfsnobody (uid=65534 and gid=65534). Many thanks to Vikhyat Umrao for writing the majority of the test-case! Change-Id: I6379a3d2ef52b9b9707f2f6f0529657580c8d779 BUG: 1043886 CC: Vikhyat Umrao <vumrao@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/6546 Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Reviewed-by: Vikhyat Umrao <vumrao@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index 131f96ce667..b1989567a4d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -831,6 +831,16 @@ struct volopt_map_entry glusterd_volopt_map[] = {
.option = "root-squash",
.op_version = 2
},
+ { .key = "server.anonuid",
+ .voltype = "protocol/server",
+ .option = "anonuid",
+ .op_version = 3
+ },
+ { .key = "server.anongid",
+ .voltype = "protocol/server",
+ .option = "anongid",
+ .op_version = 3
+ },
{ .key = "server.statedump-path",
.voltype = "protocol/server",
.option = "statedump-path",