|
|
887953 |
From 00c78b9eb52d8a631cdaef883cd507bd0889639a Mon Sep 17 00:00:00 2001
|
|
|
887953 |
From: Amar Tumballi <amarts@redhat.com>
|
|
|
887953 |
Date: Fri, 28 Sep 2018 12:06:09 +0530
|
|
|
887953 |
Subject: [PATCH 396/399] protocol: remove the option 'verify-volfile-checksum'
|
|
|
887953 |
|
|
|
887953 |
'getspec' operation is not used between 'client' and 'server' ever since
|
|
|
887953 |
we have off-loaded volfile management to glusterd, ie, at least 7 years.
|
|
|
887953 |
|
|
|
887953 |
No reason to keep the dead code! The removed option had no meaning,
|
|
|
887953 |
as glusterd didn't provide a way to set (or unset) this option. So,
|
|
|
887953 |
no regression should be observed from any of the existing glusterfs
|
|
|
887953 |
deployment, supported or unsupported.
|
|
|
887953 |
|
|
|
887953 |
Fixes: CVE-2018-14653
|
|
|
887953 |
|
|
|
887953 |
BUG: 1634668
|
|
|
887953 |
Change-Id: I8b3a4d302b3c222e065b484cfe449b9c116393f8
|
|
|
887953 |
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
887953 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/151322
|
|
|
887953 |
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
|
|
|
887953 |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
887953 |
---
|
|
|
887953 |
xlators/protocol/client/src/client-handshake.c | 83 +-------
|
|
|
887953 |
xlators/protocol/server/src/server-handshake.c | 276 +------------------------
|
|
|
887953 |
xlators/protocol/server/src/server.c | 3 -
|
|
|
887953 |
3 files changed, 5 insertions(+), 357 deletions(-)
|
|
|
887953 |
|
|
|
887953 |
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
|
|
|
887953 |
index aee6b3a..7b36178 100644
|
|
|
887953 |
--- a/xlators/protocol/client/src/client-handshake.c
|
|
|
887953 |
+++ b/xlators/protocol/client/src/client-handshake.c
|
|
|
887953 |
@@ -37,91 +37,10 @@ typedef struct client_fd_lk_local {
|
|
|
887953 |
clnt_fd_ctx_t *fdctx;
|
|
|
887953 |
}clnt_fd_lk_local_t;
|
|
|
887953 |
|
|
|
887953 |
-int
|
|
|
887953 |
-client3_getspec_cbk (struct rpc_req *req, struct iovec *iov, int count,
|
|
|
887953 |
- void *myframe)
|
|
|
887953 |
-{
|
|
|
887953 |
- gf_getspec_rsp rsp = {0,};
|
|
|
887953 |
- call_frame_t *frame = NULL;
|
|
|
887953 |
- int ret = 0;
|
|
|
887953 |
-
|
|
|
887953 |
- frame = myframe;
|
|
|
887953 |
-
|
|
|
887953 |
- if (!frame || !frame->this) {
|
|
|
887953 |
- gf_msg (THIS->name, GF_LOG_ERROR, EINVAL, PC_MSG_INVALID_ENTRY,
|
|
|
887953 |
- "frame not found with the request, returning EINVAL");
|
|
|
887953 |
- rsp.op_ret = -1;
|
|
|
887953 |
- rsp.op_errno = EINVAL;
|
|
|
887953 |
- goto out;
|
|
|
887953 |
- }
|
|
|
887953 |
- if (-1 == req->rpc_status) {
|
|
|
887953 |
- gf_msg (frame->this->name, GF_LOG_WARNING, ENOTCONN,
|
|
|
887953 |
- PC_MSG_RPC_STATUS_ERROR, "received RPC status error, "
|
|
|
887953 |
- "returning ENOTCONN");
|
|
|
887953 |
- rsp.op_ret = -1;
|
|
|
887953 |
- rsp.op_errno = ENOTCONN;
|
|
|
887953 |
- goto out;
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
- ret = xdr_to_generic (*iov, &rsp, (xdrproc_t)xdr_gf_getspec_rsp);
|
|
|
887953 |
- if (ret < 0) {
|
|
|
887953 |
- gf_msg (frame->this->name, GF_LOG_ERROR, EINVAL,
|
|
|
887953 |
- PC_MSG_XDR_DECODING_FAILED,
|
|
|
887953 |
- "XDR decoding failed, returning EINVAL");
|
|
|
887953 |
- rsp.op_ret = -1;
|
|
|
887953 |
- rsp.op_errno = EINVAL;
|
|
|
887953 |
- goto out;
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
- if (-1 == rsp.op_ret) {
|
|
|
887953 |
- gf_msg (frame->this->name, GF_LOG_WARNING, 0,
|
|
|
887953 |
- PC_MSG_VOL_FILE_NOT_FOUND, "failed to get the 'volume "
|
|
|
887953 |
- "file' from server");
|
|
|
887953 |
- goto out;
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
-out:
|
|
|
887953 |
- CLIENT_STACK_UNWIND (getspec, frame, rsp.op_ret, rsp.op_errno,
|
|
|
887953 |
- rsp.spec);
|
|
|
887953 |
-
|
|
|
887953 |
- /* Don't use 'GF_FREE', this is allocated by libc */
|
|
|
887953 |
- free (rsp.spec);
|
|
|
887953 |
- free (rsp.xdata.xdata_val);
|
|
|
887953 |
-
|
|
|
887953 |
- return 0;
|
|
|
887953 |
-}
|
|
|
887953 |
-
|
|
|
887953 |
int32_t client3_getspec (call_frame_t *frame, xlator_t *this, void *data)
|
|
|
887953 |
{
|
|
|
887953 |
- clnt_conf_t *conf = NULL;
|
|
|
887953 |
- clnt_args_t *args = NULL;
|
|
|
887953 |
- gf_getspec_req req = {0,};
|
|
|
887953 |
- int op_errno = ESTALE;
|
|
|
887953 |
- int ret = 0;
|
|
|
887953 |
-
|
|
|
887953 |
- if (!frame || !this || !data)
|
|
|
887953 |
- goto unwind;
|
|
|
887953 |
-
|
|
|
887953 |
- args = data;
|
|
|
887953 |
- conf = this->private;
|
|
|
887953 |
- req.flags = args->flags;
|
|
|
887953 |
- req.key = (char *)args->name;
|
|
|
887953 |
-
|
|
|
887953 |
- ret = client_submit_request (this, &req, frame, conf->handshake,
|
|
|
887953 |
- GF_HNDSK_GETSPEC, client3_getspec_cbk,
|
|
|
887953 |
- NULL, NULL, 0, NULL, 0, NULL,
|
|
|
887953 |
- (xdrproc_t)xdr_gf_getspec_req);
|
|
|
887953 |
-
|
|
|
887953 |
- if (ret) {
|
|
|
887953 |
- gf_msg (this->name, GF_LOG_WARNING, 0, PC_MSG_SEND_REQ_FAIL,
|
|
|
887953 |
- "failed to send the request");
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
- return 0;
|
|
|
887953 |
-unwind:
|
|
|
887953 |
- CLIENT_STACK_UNWIND (getspec, frame, -1, op_errno, NULL);
|
|
|
887953 |
+ CLIENT_STACK_UNWIND (getspec, frame, -1, ENOSYS, NULL);
|
|
|
887953 |
return 0;
|
|
|
887953 |
-
|
|
|
887953 |
}
|
|
|
887953 |
|
|
|
887953 |
int
|
|
|
887953 |
diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c
|
|
|
887953 |
index 75577fa..217678a 100644
|
|
|
887953 |
--- a/xlators/protocol/server/src/server-handshake.c
|
|
|
887953 |
+++ b/xlators/protocol/server/src/server-handshake.c
|
|
|
887953 |
@@ -38,204 +38,13 @@ gf_compare_client_version (rpcsvc_request_t *req, int fop_prognum,
|
|
|
887953 |
}
|
|
|
887953 |
|
|
|
887953 |
int
|
|
|
887953 |
-_volfile_update_checksum (xlator_t *this, char *key, uint32_t checksum)
|
|
|
887953 |
-{
|
|
|
887953 |
- server_conf_t *conf = NULL;
|
|
|
887953 |
- struct _volfile_ctx *temp_volfile = NULL;
|
|
|
887953 |
-
|
|
|
887953 |
- conf = this->private;
|
|
|
887953 |
- temp_volfile = conf->volfile;
|
|
|
887953 |
-
|
|
|
887953 |
- while (temp_volfile) {
|
|
|
887953 |
- if ((NULL == key) && (NULL == temp_volfile->key))
|
|
|
887953 |
- break;
|
|
|
887953 |
- if ((NULL == key) || (NULL == temp_volfile->key)) {
|
|
|
887953 |
- temp_volfile = temp_volfile->next;
|
|
|
887953 |
- continue;
|
|
|
887953 |
- }
|
|
|
887953 |
- if (strcmp (temp_volfile->key, key) == 0)
|
|
|
887953 |
- break;
|
|
|
887953 |
- temp_volfile = temp_volfile->next;
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
- if (!temp_volfile) {
|
|
|
887953 |
- temp_volfile = GF_CALLOC (1, sizeof (struct _volfile_ctx),
|
|
|
887953 |
- gf_server_mt_volfile_ctx_t);
|
|
|
887953 |
- if (!temp_volfile)
|
|
|
887953 |
- goto out;
|
|
|
887953 |
- temp_volfile->next = conf->volfile;
|
|
|
887953 |
- temp_volfile->key = (key)? gf_strdup (key): NULL;
|
|
|
887953 |
- temp_volfile->checksum = checksum;
|
|
|
887953 |
-
|
|
|
887953 |
- conf->volfile = temp_volfile;
|
|
|
887953 |
- goto out;
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
- if (temp_volfile->checksum != checksum) {
|
|
|
887953 |
- gf_msg (this->name, GF_LOG_INFO, 0, PS_MSG_REMOUNT_CLIENT_REQD,
|
|
|
887953 |
- "the volume file was modified between a prior access "
|
|
|
887953 |
- "and now. This may lead to inconsistency between "
|
|
|
887953 |
- "clients, you are advised to remount client");
|
|
|
887953 |
- temp_volfile->checksum = checksum;
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
-out:
|
|
|
887953 |
- return 0;
|
|
|
887953 |
-}
|
|
|
887953 |
-
|
|
|
887953 |
-
|
|
|
887953 |
-static size_t
|
|
|
887953 |
-getspec_build_volfile_path (xlator_t *this, const char *key, char *path,
|
|
|
887953 |
- size_t path_len)
|
|
|
887953 |
-{
|
|
|
887953 |
- char *filename = NULL;
|
|
|
887953 |
- server_conf_t *conf = NULL;
|
|
|
887953 |
- int ret = -1;
|
|
|
887953 |
- int free_filename = 0;
|
|
|
887953 |
- char data_key[256] = {0,};
|
|
|
887953 |
-
|
|
|
887953 |
- conf = this->private;
|
|
|
887953 |
-
|
|
|
887953 |
- /* Inform users that this option is changed now */
|
|
|
887953 |
- ret = dict_get_str (this->options, "client-volume-filename",
|
|
|
887953 |
- &filename);
|
|
|
887953 |
- if (ret == 0) {
|
|
|
887953 |
- gf_msg (this->name, GF_LOG_WARNING, 0, PS_MSG_DEFAULTING_FILE,
|
|
|
887953 |
- "option 'client-volume-filename' is changed to "
|
|
|
887953 |
- "'volume-filename.<key>' which now takes 'key' as an "
|
|
|
887953 |
- "option to choose/fetch different files from server. "
|
|
|
887953 |
- "Refer documentation or contact developers for more "
|
|
|
887953 |
- "info. Currently defaulting to given file '%s'",
|
|
|
887953 |
- filename);
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
- if (key && !filename) {
|
|
|
887953 |
- sprintf (data_key, "volume-filename.%s", key);
|
|
|
887953 |
- ret = dict_get_str (this->options, data_key, &filename);
|
|
|
887953 |
- if (ret < 0) {
|
|
|
887953 |
- /* Make sure that key doesn't contain "../" in path */
|
|
|
887953 |
- if ((gf_strstr (key, "/", "..")) == -1) {
|
|
|
887953 |
- gf_msg (this->name, GF_LOG_ERROR, EINVAL,
|
|
|
887953 |
- PS_MSG_INVALID_ENTRY, "%s: invalid "
|
|
|
887953 |
- "key", key);
|
|
|
887953 |
- goto out;
|
|
|
887953 |
- }
|
|
|
887953 |
- }
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
- if (!filename) {
|
|
|
887953 |
- ret = dict_get_str (this->options,
|
|
|
887953 |
- "volume-filename.default", &filename);
|
|
|
887953 |
- if (ret < 0) {
|
|
|
887953 |
- gf_msg_debug (this->name, 0, "no default volume "
|
|
|
887953 |
- "filename given, defaulting to %s",
|
|
|
887953 |
- DEFAULT_VOLUME_FILE_PATH);
|
|
|
887953 |
- }
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
- if (!filename && key) {
|
|
|
887953 |
- ret = gf_asprintf (&filename, "%s/%s.vol", conf->conf_dir, key);
|
|
|
887953 |
- if (-1 == ret)
|
|
|
887953 |
- goto out;
|
|
|
887953 |
-
|
|
|
887953 |
- free_filename = 1;
|
|
|
887953 |
- }
|
|
|
887953 |
- if (!filename)
|
|
|
887953 |
- filename = DEFAULT_VOLUME_FILE_PATH;
|
|
|
887953 |
-
|
|
|
887953 |
- ret = -1;
|
|
|
887953 |
-
|
|
|
887953 |
- if ((filename) && (path_len > strlen (filename))) {
|
|
|
887953 |
- strcpy (path, filename);
|
|
|
887953 |
- ret = strlen (filename);
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
-out:
|
|
|
887953 |
- if (free_filename)
|
|
|
887953 |
- GF_FREE (filename);
|
|
|
887953 |
-
|
|
|
887953 |
- return ret;
|
|
|
887953 |
-}
|
|
|
887953 |
-
|
|
|
887953 |
-int
|
|
|
887953 |
-_validate_volfile_checksum (xlator_t *this, char *key,
|
|
|
887953 |
- uint32_t checksum)
|
|
|
887953 |
-{
|
|
|
887953 |
- char filename[PATH_MAX] = {0,};
|
|
|
887953 |
- server_conf_t *conf = NULL;
|
|
|
887953 |
- struct _volfile_ctx *temp_volfile = NULL;
|
|
|
887953 |
- int ret = 0;
|
|
|
887953 |
- int fd = 0;
|
|
|
887953 |
- uint32_t local_checksum = 0;
|
|
|
887953 |
-
|
|
|
887953 |
- conf = this->private;
|
|
|
887953 |
- temp_volfile = conf->volfile;
|
|
|
887953 |
-
|
|
|
887953 |
- if (!checksum)
|
|
|
887953 |
- goto out;
|
|
|
887953 |
-
|
|
|
887953 |
- if (!temp_volfile) {
|
|
|
887953 |
- ret = getspec_build_volfile_path (this, key, filename,
|
|
|
887953 |
- sizeof (filename));
|
|
|
887953 |
- if (ret <= 0)
|
|
|
887953 |
- goto out;
|
|
|
887953 |
- fd = open (filename, O_RDONLY);
|
|
|
887953 |
- if (-1 == fd) {
|
|
|
887953 |
- ret = 0;
|
|
|
887953 |
- gf_msg (this->name, GF_LOG_INFO, errno,
|
|
|
887953 |
- PS_MSG_VOL_FILE_OPEN_FAILED,
|
|
|
887953 |
- "failed to open volume file (%s) : %s",
|
|
|
887953 |
- filename, strerror (errno));
|
|
|
887953 |
- goto out;
|
|
|
887953 |
- }
|
|
|
887953 |
- get_checksum_for_file (fd, &local_checksum);
|
|
|
887953 |
- _volfile_update_checksum (this, key, local_checksum);
|
|
|
887953 |
- sys_close (fd);
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
- temp_volfile = conf->volfile;
|
|
|
887953 |
- while (temp_volfile) {
|
|
|
887953 |
- if ((NULL == key) && (NULL == temp_volfile->key))
|
|
|
887953 |
- break;
|
|
|
887953 |
- if ((NULL == key) || (NULL == temp_volfile->key)) {
|
|
|
887953 |
- temp_volfile = temp_volfile->next;
|
|
|
887953 |
- continue;
|
|
|
887953 |
- }
|
|
|
887953 |
- if (strcmp (temp_volfile->key, key) == 0)
|
|
|
887953 |
- break;
|
|
|
887953 |
- temp_volfile = temp_volfile->next;
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
- if (!temp_volfile)
|
|
|
887953 |
- goto out;
|
|
|
887953 |
-
|
|
|
887953 |
- if ((temp_volfile->checksum) &&
|
|
|
887953 |
- (checksum != temp_volfile->checksum))
|
|
|
887953 |
- ret = -1;
|
|
|
887953 |
-
|
|
|
887953 |
-out:
|
|
|
887953 |
- return ret;
|
|
|
887953 |
-}
|
|
|
887953 |
-
|
|
|
887953 |
-
|
|
|
887953 |
-int
|
|
|
887953 |
server_getspec (rpcsvc_request_t *req)
|
|
|
887953 |
{
|
|
|
887953 |
- int32_t ret = -1;
|
|
|
887953 |
+ int ret = 0;
|
|
|
887953 |
int32_t op_errno = ENOENT;
|
|
|
887953 |
- int32_t spec_fd = -1;
|
|
|
887953 |
- size_t file_len = 0;
|
|
|
887953 |
- char filename[PATH_MAX] = {0,};
|
|
|
887953 |
- struct stat stbuf = {0,};
|
|
|
887953 |
- uint32_t checksum = 0;
|
|
|
887953 |
- char *key = NULL;
|
|
|
887953 |
- server_conf_t *conf = NULL;
|
|
|
887953 |
- xlator_t *this = NULL;
|
|
|
887953 |
gf_getspec_req args = {0,};
|
|
|
887953 |
gf_getspec_rsp rsp = {0,};
|
|
|
887953 |
|
|
|
887953 |
- this = req->svc->xl;
|
|
|
887953 |
- conf = this->private;
|
|
|
887953 |
ret = xdr_to_generic (req->msg[0], &args,
|
|
|
887953 |
(xdrproc_t)xdr_gf_getspec_req);
|
|
|
887953 |
if (ret < 0) {
|
|
|
887953 |
@@ -245,58 +54,11 @@ server_getspec (rpcsvc_request_t *req)
|
|
|
887953 |
goto fail;
|
|
|
887953 |
}
|
|
|
887953 |
|
|
|
887953 |
- ret = getspec_build_volfile_path (this, args.key,
|
|
|
887953 |
- filename, sizeof (filename));
|
|
|
887953 |
- if (ret > 0) {
|
|
|
887953 |
- /* to allocate the proper buffer to hold the file data */
|
|
|
887953 |
- ret = sys_stat (filename, &stbuf);
|
|
|
887953 |
- if (ret < 0){
|
|
|
887953 |
- gf_msg (this->name, GF_LOG_ERROR, errno,
|
|
|
887953 |
- PS_MSG_STAT_ERROR, "Unable to stat %s (%s)",
|
|
|
887953 |
- filename, strerror (errno));
|
|
|
887953 |
- op_errno = errno;
|
|
|
887953 |
- goto fail;
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
- spec_fd = open (filename, O_RDONLY);
|
|
|
887953 |
- if (spec_fd < 0) {
|
|
|
887953 |
- gf_msg (this->name, GF_LOG_ERROR, errno,
|
|
|
887953 |
- PS_MSG_FILE_OP_FAILED, "Unable to open %s "
|
|
|
887953 |
- "(%s)", filename, strerror (errno));
|
|
|
887953 |
- op_errno = errno;
|
|
|
887953 |
- goto fail;
|
|
|
887953 |
- }
|
|
|
887953 |
- ret = file_len = stbuf.st_size;
|
|
|
887953 |
-
|
|
|
887953 |
- if (conf->verify_volfile) {
|
|
|
887953 |
- get_checksum_for_file (spec_fd, &checksum);
|
|
|
887953 |
- _volfile_update_checksum (this, key, checksum);
|
|
|
887953 |
- }
|
|
|
887953 |
- } else {
|
|
|
887953 |
- op_errno = ENOENT;
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
- if (file_len) {
|
|
|
887953 |
- rsp.spec = GF_CALLOC (file_len, sizeof (char),
|
|
|
887953 |
- gf_server_mt_rsp_buf_t);
|
|
|
887953 |
- if (!rsp.spec) {
|
|
|
887953 |
- ret = -1;
|
|
|
887953 |
- op_errno = ENOMEM;
|
|
|
887953 |
- goto fail;
|
|
|
887953 |
- }
|
|
|
887953 |
- ret = sys_read (spec_fd, rsp.spec, file_len);
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
- /* convert to XDR */
|
|
|
887953 |
- op_errno = errno;
|
|
|
887953 |
+ op_errno = ENOSYS;
|
|
|
887953 |
fail:
|
|
|
887953 |
- if (!rsp.spec)
|
|
|
887953 |
- rsp.spec = "";
|
|
|
887953 |
+ rsp.spec = "<this method is not in use, use glusterd for getspec>";
|
|
|
887953 |
rsp.op_errno = gf_errno_to_error (op_errno);
|
|
|
887953 |
- rsp.op_ret = ret;
|
|
|
887953 |
-
|
|
|
887953 |
- if (spec_fd != -1)
|
|
|
887953 |
- sys_close (spec_fd);
|
|
|
887953 |
+ rsp.op_ret = -1;
|
|
|
887953 |
|
|
|
887953 |
server_submit_reply (NULL, req, &rsp, NULL, 0, NULL,
|
|
|
887953 |
(xdrproc_t)xdr_gf_getspec_rsp);
|
|
|
887953 |
@@ -459,9 +221,7 @@ server_setvolume (rpcsvc_request_t *req)
|
|
|
887953 |
char *clnt_version = NULL;
|
|
|
887953 |
xlator_t *xl = NULL;
|
|
|
887953 |
char *msg = NULL;
|
|
|
887953 |
- char *volfile_key = NULL;
|
|
|
887953 |
xlator_t *this = NULL;
|
|
|
887953 |
- uint32_t checksum = 0;
|
|
|
887953 |
int32_t ret = -1;
|
|
|
887953 |
int32_t op_ret = -1;
|
|
|
887953 |
int32_t op_errno = EINVAL;
|
|
|
887953 |
@@ -756,34 +516,6 @@ server_setvolume (rpcsvc_request_t *req)
|
|
|
887953 |
goto fail;
|
|
|
887953 |
}
|
|
|
887953 |
|
|
|
887953 |
- if (conf->verify_volfile) {
|
|
|
887953 |
- ret = dict_get_uint32 (params, "volfile-checksum", &checksum);
|
|
|
887953 |
- if (ret == 0) {
|
|
|
887953 |
- ret = dict_get_str (params, "volfile-key",
|
|
|
887953 |
- &volfile_key);
|
|
|
887953 |
- if (ret)
|
|
|
887953 |
- gf_msg_debug (this->name, 0, "failed to get "
|
|
|
887953 |
- "'volfile-key'");
|
|
|
887953 |
-
|
|
|
887953 |
- ret = _validate_volfile_checksum (this, volfile_key,
|
|
|
887953 |
- checksum);
|
|
|
887953 |
- if (-1 == ret) {
|
|
|
887953 |
- ret = dict_set_str (reply, "ERROR",
|
|
|
887953 |
- "volume-file checksum "
|
|
|
887953 |
- "varies from earlier "
|
|
|
887953 |
- "access");
|
|
|
887953 |
- if (ret < 0)
|
|
|
887953 |
- gf_msg_debug (this->name, 0, "failed "
|
|
|
887953 |
- "to set error msg");
|
|
|
887953 |
-
|
|
|
887953 |
- op_ret = -1;
|
|
|
887953 |
- op_errno = ESTALE;
|
|
|
887953 |
- goto fail;
|
|
|
887953 |
- }
|
|
|
887953 |
- }
|
|
|
887953 |
- }
|
|
|
887953 |
-
|
|
|
887953 |
-
|
|
|
887953 |
peerinfo = &req->trans->peerinfo;
|
|
|
887953 |
if (peerinfo) {
|
|
|
887953 |
ret = dict_set_static_ptr (params, "peer-info", peerinfo);
|
|
|
887953 |
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
|
|
|
887953 |
index 11ee7ba..d0e815e 100644
|
|
|
887953 |
--- a/xlators/protocol/server/src/server.c
|
|
|
887953 |
+++ b/xlators/protocol/server/src/server.c
|
|
|
887953 |
@@ -1797,9 +1797,6 @@ struct volume_options options[] = {
|
|
|
887953 |
.description = "Specifies the limit on the number of inodes "
|
|
|
887953 |
"in the lru list of the inode cache."
|
|
|
887953 |
},
|
|
|
887953 |
- { .key = {"verify-volfile-checksum"},
|
|
|
887953 |
- .type = GF_OPTION_TYPE_BOOL
|
|
|
887953 |
- },
|
|
|
887953 |
{ .key = {"trace"},
|
|
|
887953 |
.type = GF_OPTION_TYPE_BOOL
|
|
|
887953 |
},
|
|
|
887953 |
--
|
|
|
887953 |
1.8.3.1
|
|
|
887953 |
|