summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handler.c
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2014-05-20 19:57:37 +0530
committerVenky Shankar <vshankar@redhat.com>2014-05-25 19:50:54 -0700
commita6da7b531bccbec8c8320acb09e2ee6a5df73a33 (patch)
tree9926725b86216c9820b90aa4d671f232db9438ee /xlators/mgmt/glusterd/src/glusterd-handler.c
parent5224a785faaa615adac7cd25207912ab109ad7e6 (diff)
mgmt/glusterd: Allow mount/umount requests over AF_INET
Along with a simple naming convention change to avoid confusion as per below. s/gd_svc_cli_prog_ro/gd_svc_cli_trusted_progs/ s/gd_svc_cli_actors_ro/gd_svc_cli_trusted_actors/ Change-Id: Ibc73d88846636656f060a811f641f37a1a864615 BUG: 1077452 Original-Author: Vijay Bellur <vbellur@redhat.com> Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/7821 Reviewed-by: Kotresh HR <khiremat@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index bddc2db5843..64c7ddfa5fb 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -4444,23 +4444,27 @@ struct rpcsvc_program gd_svc_cli_prog = {
.synctask = _gf_true,
};
-/* This is a minimal RPC prog, which contains only the readonly RPC procs from
- * the cli rpcsvc
+/**
+ * This set of RPC progs are deemed to be trusted. Most of the actors support
+ * read only queries, the only exception being MOUNT/UMOUNT which is required
+ * by geo-replication to supprt unprivileged master -> slave sessions.
*/
-rpcsvc_actor_t gd_svc_cli_actors_ro[GLUSTER_CLI_MAXVALUE] = {
+rpcsvc_actor_t gd_svc_cli_trusted_actors[GLUSTER_CLI_MAXVALUE] = {
[GLUSTER_CLI_LIST_FRIENDS] = { "LIST_FRIENDS", GLUSTER_CLI_LIST_FRIENDS, glusterd_handle_cli_list_friends, NULL, 0, DRC_NA},
[GLUSTER_CLI_UUID_GET] = { "UUID_GET", GLUSTER_CLI_UUID_GET, glusterd_handle_cli_uuid_get, NULL, 0, DRC_NA},
[GLUSTER_CLI_GET_VOLUME] = { "GET_VOLUME", GLUSTER_CLI_GET_VOLUME, glusterd_handle_cli_get_volume, NULL, 0, DRC_NA},
[GLUSTER_CLI_GETWD] = { "GETWD", GLUSTER_CLI_GETWD, glusterd_handle_getwd, NULL, 1, DRC_NA},
[GLUSTER_CLI_STATUS_VOLUME] = {"STATUS_VOLUME", GLUSTER_CLI_STATUS_VOLUME, glusterd_handle_status_volume, NULL, 0, DRC_NA},
[GLUSTER_CLI_LIST_VOLUME] = {"LIST_VOLUME", GLUSTER_CLI_LIST_VOLUME, glusterd_handle_cli_list_volume, NULL, 0, DRC_NA},
+ [GLUSTER_CLI_MOUNT] = { "MOUNT", GLUSTER_CLI_MOUNT, glusterd_handle_mount, NULL, 1, DRC_NA},
+ [GLUSTER_CLI_UMOUNT] = { "UMOUNT", GLUSTER_CLI_UMOUNT, glusterd_handle_umount, NULL, 1, DRC_NA},
};
-struct rpcsvc_program gd_svc_cli_prog_ro = {
+struct rpcsvc_program gd_svc_cli_trusted_progs = {
.progname = "GlusterD svc cli read-only",
.prognum = GLUSTER_CLI_PROGRAM,
.progver = GLUSTER_CLI_VERSION,
.numactors = GLUSTER_CLI_MAXVALUE,
- .actors = gd_svc_cli_actors_ro,
+ .actors = gd_svc_cli_trusted_actors,
.synctask = _gf_true,
};