diff options
| author | shishir gowda <shishirng@gluster.com> | 2011-05-31 08:19:18 +0000 | 
|---|---|---|
| committer | Anand Avati <avati@gluster.com> | 2011-05-31 09:12:04 -0700 | 
| commit | 02443793c6bf3453c7a937737f5159c060ef6504 (patch) | |
| tree | 1246c22bc6b5c8b121b1121e84af03c12a2cbeb5 /rpc/rpc-lib/src/rpc-transport.c | |
| parent | 24c9e2cbe6d1d95ce7a7eccec14dd3ef034a0347 (diff) | |
Introduce client-allow-insecure xlator-option.
Allows glusterfs clients to bind to any port and does not restrict it
to 1024.
This is a xlator-option only, and is not supported in volume set cmd.
The reason is, few clients may choose this, and few may not. Hence
only supported as a xlator-option during mount time.
For this to work with glusterfs, server.allow-insecure should be set
to on
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2868 (Add xlator-option to support insecure-bind for clients)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2868
Diffstat (limited to 'rpc/rpc-lib/src/rpc-transport.c')
| -rw-r--r-- | rpc/rpc-lib/src/rpc-transport.c | 16 | 
1 files changed, 16 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index e7ffb065ff6..8a33bdf2a3e 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -701,6 +701,7 @@ rpc_transport_load (glusterfs_ctx_t *ctx, dict_t *options, char *trans_name)  	int32_t ret = -1;  	int8_t is_tcp = 0, is_unix = 0, is_ibsdp = 0;  	volume_opt_list_t *vol_opt = NULL; +        gf_boolean_t client_bind_insecure = _gf_false;  	GF_VALIDATE_OR_GOTO("rpc-transport", options, fail);  	GF_VALIDATE_OR_GOTO("rpc-transport", ctx, fail); @@ -762,6 +763,21 @@ rpc_transport_load (glusterfs_ctx_t *ctx, dict_t *options, char *trans_name)  		}  	} +        ret = dict_get_str (options, "client-bind-insecure", &type); +        if (ret == 0) { +                ret = gf_string2boolean (type, &client_bind_insecure); +                if (ret < 0) { +                        gf_log ("rcp-transport", GF_LOG_WARNING, +                                "client-bind-insecure option %s is not a" +                                " valid bool option", type); +                        goto fail; +                } +                if (_gf_true == client_bind_insecure) +                        trans->client_bind_insecure = 1; +        } else { +                trans->client_bind_insecure = 0; +        } +  	ret = dict_get_str (options, "transport-type", &type);  	if (ret < 0) {  		gf_log ("rpc-transport", GF_LOG_ERROR,  | 
