diff options
author | Rajesh Joseph <rjoseph@redhat.com> | 2016-08-02 15:33:34 +0000 |
---|---|---|
committer | Kaushal M <kaushal@redhat.com> | 2016-08-28 23:19:33 -0700 |
commit | 62f4e41e9eafd2838d2a11989f08b0e7627284b4 (patch) | |
tree | 99780d4086823c5c4a51b2efcef8e0291f01c638 /api/src | |
parent | 70dabd796c04eb6e95fbf83e73219e671cc05dd3 (diff) |
gfapi: SSL connection for mgmt connection is not working
Problem: libgfapi does not enable SSL on mgmt connection.
Fix: Enable SSL when it is enabled on mgmt connection is enabled,
i.e. presence of /var/lib/glusterd/secure-access file
Change-Id: I1ce4935b04e6140aeab819e42076defd580b0727
BUG: 1362602
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-on: http://review.gluster.org/15073
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'api/src')
-rw-r--r-- | api/src/glfs-mgmt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/api/src/glfs-mgmt.c b/api/src/glfs-mgmt.c index 21da06889d1..f476ce14d54 100644 --- a/api/src/glfs-mgmt.c +++ b/api/src/glfs-mgmt.c @@ -36,6 +36,7 @@ #include "glfs-internal.h" #include "glfs-mem-types.h" #include "gfapi-messages.h" +#include "syscall.h" int glfs_volfile_fetch (struct glfs *fs); int32_t glfs_get_volume_info_rpc (call_frame_t *frame, xlator_t *this, @@ -916,6 +917,10 @@ glfs_mgmt_init (struct glfs *fs) if (ret) goto out; + if (sys_access (SECURE_ACCESS_FILE, F_OK) == 0) { + ctx->secure_mgmt = 1; + } + rpc = rpc_clnt_new (options, THIS, THIS->name, 8); if (!rpc) { ret = -1; |