diff options
Diffstat (limited to 'xlators/protocol/server/src')
-rw-r--r-- | xlators/protocol/server/src/server-handshake.c | 18 | ||||
-rw-r--r-- | xlators/protocol/server/src/server3_1-fops.c | 2 |
2 files changed, 15 insertions, 5 deletions
diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c index ca7784bad5a..6b35f4decfc 100644 --- a/xlators/protocol/server/src/server-handshake.c +++ b/xlators/protocol/server/src/server-handshake.c @@ -343,6 +343,7 @@ server_setvolume (rpcsvc_request_t *req) dict_t *params = NULL; char *name = NULL; char *process_uuid = NULL; + char *clnt_version = NULL; xlator_t *xl = NULL; char *msg = NULL; char *volfile_key = NULL; @@ -523,13 +524,20 @@ server_setvolume (rpcsvc_request_t *req) "Authentication module not initialized"); } + ret = dict_get_str (params, "client-version", &clnt_version); + if (ret) + gf_log (this->name, GF_LOG_INFO, "client-version not set, " + "may be of older version"); + ret = gf_authenticate (params, config_params, conf->auth_modules); if (ret == AUTH_ACCEPT) { + gf_log (this->name, GF_LOG_INFO, - "accepted client from %s", - (peerinfo)?peerinfo->identifier:""); + "accepted client from %s (version: %s)", + (peerinfo) ? peerinfo->identifier : "<>", + (clnt_version) ? clnt_version : "old"); op_ret = 0; conn->bound_xl = xl; ret = dict_set_str (reply, "ERROR", "Success"); @@ -538,8 +546,10 @@ server_setvolume (rpcsvc_request_t *req) "failed to set error msg"); } else { gf_log (this->name, GF_LOG_ERROR, - "Cannot authenticate client from %s", - (peerinfo)? peerinfo->identifier:"<>"); + "Cannot authenticate client from %s %s", + (peerinfo) ? peerinfo->identifier : "<>", + (clnt_version) ? clnt_version : "old"); + op_ret = -1; op_errno = EACCES; ret = dict_set_str (reply, "ERROR", "Authentication failed"); diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c index e869cb48ea5..289489e506e 100644 --- a/xlators/protocol/server/src/server3_1-fops.c +++ b/xlators/protocol/server/src/server3_1-fops.c @@ -5218,7 +5218,7 @@ rpcsvc_actor_t glusterfs3_1_fop_actors[] = { struct rpcsvc_program glusterfs3_1_fop_prog = { - .progname = "GlusterFS-3.1.0", + .progname = "GlusterFS " PACKAGE_VERSION, .prognum = GLUSTER3_1_FOP_PROGRAM, .progver = GLUSTER3_1_FOP_VERSION, .numactors = GLUSTER3_1_FOP_PROCCNT, |