diff options
author | Môshe van der Sterre <me@moshe.nl> | 2020-09-28 06:12:32 +0200 |
---|---|---|
committer | MOHIT AGRAWAL <moagrawa@redhat.com> | 2020-09-29 14:32:59 +0000 |
commit | eb4b2cb003a1e99edbb0c061502b5be73bfb5bf2 (patch) | |
tree | 878228250b02db5647d1986f76d2571bc410a752 /api | |
parent | 773aaddc656a57b23bfae60808f099439329602c (diff) |
gfapi: Move the SECURE_ACCESS_FILE check out of glfs_mgmt_init
glfs_mgmt_init is only called for glfs_set_volfile_server, but
secure_mgmt is also required to use glfs_set_volfile with SSL.
fixes: #829
Change-Id: Ibc769fe634d805e085232f85ce6e1c48bf4acc66
Diffstat (limited to 'api')
-rw-r--r-- | api/src/glfs-mgmt.c | 5 | ||||
-rw-r--r-- | api/src/glfs.c | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/api/src/glfs-mgmt.c b/api/src/glfs-mgmt.c index 08df2b1a4b7..7c82b8cd162 100644 --- a/api/src/glfs-mgmt.c +++ b/api/src/glfs-mgmt.c @@ -1013,11 +1013,6 @@ glfs_mgmt_init(struct glfs *fs) if (ret) goto out; - if (sys_access(SECURE_ACCESS_FILE, F_OK) == 0) { - ctx->secure_mgmt = 1; - ctx->ssl_cert_depth = glusterfs_read_secure_access_file(); - } - rpc = rpc_clnt_new(options, THIS, THIS->name, 8); if (!rpc) { ret = -1; diff --git a/api/src/glfs.c b/api/src/glfs.c index e4e6ad69fd0..b4bf1423f6d 100644 --- a/api/src/glfs.c +++ b/api/src/glfs.c @@ -251,6 +251,11 @@ glfs_volumes_init(struct glfs *fs) if (!vol_assigned(cmd_args)) return -1; + if (sys_access(SECURE_ACCESS_FILE, F_OK) == 0) { + fs->ctx->secure_mgmt = 1; + fs->ctx->ssl_cert_depth = glusterfs_read_secure_access_file(); + } + if (cmd_args->volfile_server) { ret = glfs_mgmt_init(fs); goto out; |