summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c1
-rw-r--r--xlators/protocol/server/src/server.c9
2 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 9681f4442..fc2c64a5f 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -163,6 +163,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
{"transport.keepalive", "protocol/server", "transport.socket.keepalive", NULL, NO_DOC, 0, 1},
{"server.allow-insecure", "protocol/server", "rpc-auth-allow-insecure", NULL, NO_DOC, 0, 1},
+ {"server.root-squash", "protocol/server", "root-squash", NULL, DOC, 0, 2},
{"server.statedump-path", "protocol/server", "statedump-path", NULL, DOC, 0, 1},
{"features.lock-heal", "protocol/server", "lk-heal", NULL, NO_DOC, 0, 1},
{"features.grace-timeout", "protocol/server", "grace-timeout", NULL, NO_DOC, 0, 1},
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index 9e60febfb..3a5f84b1d 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -993,6 +993,7 @@ reconfigure (xlator_t *this, dict_t *options)
}
(void) rpcsvc_set_allow_insecure (rpc_conf, options);
+ (void) rpcsvc_set_root_squash (rpc_conf, options);
list_for_each_entry (listeners, &(rpc_conf->listeners), list) {
if (listeners->trans != NULL) {
if (listeners->trans->reconfigure )
@@ -1274,6 +1275,14 @@ struct volume_options options[] = {
{ .key = {"rpc-auth-allow-insecure"},
.type = GF_OPTION_TYPE_BOOL,
},
+ { .key = {"root-squash"},
+ .type = GF_OPTION_TYPE_BOOL,
+ .default_value = "off",
+ .description = "Map requests from uid/gid 0 to the anonymous "
+ "uid/gid. Note that this does not apply to any other"
+ "uids or gids that might be equally sensitive, such as"
+ "user bin or group staff."
+ },
{ .key = {"statedump-path"},
.type = GF_OPTION_TYPE_PATH,
.default_value = DEFAULT_VAR_RUN_DIRECTORY,