From 60d235515e582319474ba7231aad490d19240642 Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Thu, 5 May 2016 14:19:55 +0530 Subject: [PATCH] glusterfsd: explicitly turn on encryption for volfile fetch Change-Id: I58e1fe7f5edf0abb5732432291ff677e81429b79 BUG: 1333317 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.org/14253 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Jeff Darcy --- glusterfsd/src/glusterfsd-mgmt.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index 61309f9fc..d8b3ee7d9 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -2134,6 +2134,19 @@ glusterfs_mgmt_init (glusterfs_ctx_t *ctx) if (ret) goto out; + /* Explicitly turn on encrypted transport. */ + if (ctx->secure_mgmt) { + ret = dict_set_dynstr_with_alloc + (options, "transport.socket.ssl-enabled", "yes"); + if (ret) { + gf_log (THIS->name, GF_LOG_ERROR, + "failed to set 'transport.socket.ssl-enabled' " + "in options dict"); + goto out; + + } + } + rpc = rpc_clnt_new (options, THIS, THIS->name, 8); if (!rpc) { ret = -1;