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-transport/socket/src | |
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-transport/socket/src')
-rw-r--r-- | rpc/rpc-transport/socket/src/name.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rpc/rpc-transport/socket/src/name.c b/rpc/rpc-transport/socket/src/name.c index 0667e4dbb..5e8b9d758 100644 --- a/rpc/rpc-transport/socket/src/name.c +++ b/rpc/rpc-transport/socket/src/name.c @@ -435,8 +435,10 @@ client_bind (rpc_transport_t *this, *sockaddr_len = sizeof (struct sockaddr_in); case AF_INET6: - ret = af_inet_bind_to_port_lt_ceiling (sock, sockaddr, + if (!this->client_bind_insecure) { + ret = af_inet_bind_to_port_lt_ceiling (sock, sockaddr, *sockaddr_len, CLIENT_PORT_CEILING); + } if (ret == -1) { gf_log (this->name, GF_LOG_DEBUG, "cannot bind inet socket (%d) to port less than %d (%s)", |