summaryrefslogtreecommitdiffstats
path: root/heal/src/glfs-heal.c
diff options
context:
space:
mode:
authorAshish Pandey <aspandey@redhat.com>2016-03-23 11:26:49 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-03-24 16:55:00 -0700
commit351ec36e3146b7605334cb658927b447b1dbc796 (patch)
treef63f4bebdc827d5d5e77f80389f373fc106f1b70 /heal/src/glfs-heal.c
parent1b1fae4b8b351ee768f8fa61c3e5e5debfa2eb15 (diff)
glfs/heal: Use encrypted connection in shd
When management encryption is enabled, GlusterD only allows encrypted connections for port 24007. SHD is trying to fetch it's volfile using an unencrypted connection. If /var/lib/glusterd/secure-access is present , i.e. if management ssl is enabled, use encrypted connection fecth info from glusterd. Change-Id: Ia41dcde1a69375379409889ec5b3a70cb95a4fd0 BUG: 1320388 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/13815 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'heal/src/glfs-heal.c')
-rw-r--r--heal/src/glfs-heal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/heal/src/glfs-heal.c b/heal/src/glfs-heal.c
index c6c1161b05b..076b631e636 100644
--- a/heal/src/glfs-heal.c
+++ b/heal/src/glfs-heal.c
@@ -15,6 +15,7 @@
#include "glfs-handles.h"
#include "glfs-internal.h"
#include "protocol-common.h"
+#include "syscall.h"
#include "syncop.h"
#include "syncop-utils.h"
#include <string.h>
@@ -911,6 +912,10 @@ main (int argc, char **argv)
goto out;
}
+ if (sys_access(SECURE_ACCESS_FILE, F_OK) == 0) {
+ fs->ctx->secure_mgmt = 1;
+ }
+
ret = glfs_set_volfile_server (fs, "unix", DEFAULT_GLUSTERD_SOCKFILE, 0);
if (ret) {
printf("Setting the volfile server failed, %s\n", strerror (errno));