From 5698418061f736dc68aef445608641dbeca2d4a8 Mon Sep 17 00:00:00 2001
From: moagrawa <moagrawa@redhat.com>
Date: Wed, 12 Oct 2016 17:04:16 +0530
Subject: [PATCH 096/141] socket: log the client identifier in ssl connect
Problem: client identifier is not logged in message in ssl_setup_connection
Solutuion: In ssl_setup_connection xl_private is not available in rpc_transport
so changed to this peerinfo.identifier.
> BUG: 1380275
> Change-Id: I05006a3d63e46de8c388298c22faa9a3329eb6f3
> Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
> Reviewed-on: http://review.gluster.org/15596
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
> (cherry picked from commit 2e23c62cc50037c8e61bcd9c04348409e7627181)
BUG: 1333885
Change-Id: I3ab189723e1a3739a3942850956c57914b4b6a0a
Signed-off-by: moagrawa <moagrawa@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/86906
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Atin Mukherjee <amukherj@redhat.com>
---
rpc/rpc-transport/socket/src/socket.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index d9383c3..f13d9b7 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -343,14 +343,14 @@ ssl_setup_connection (rpc_transport_t *this, int server)
gf_log(this->name,GF_LOG_INFO,"peer CN = %s", peer_CN);
gf_log (this->name, GF_LOG_INFO,
"SSL verification succeeded (client: %s)",
- this->xl_private?this->xl_private->client_uid:"");
+ this->peerinfo.identifier);
return gf_strdup(peer_CN);
/* Error paths. */
ssl_error:
gf_log (this->name, GF_LOG_ERROR,
"SSL connect error (client: %s)",
- this->xl_private?this->xl_private->client_uid:"");
+ this->peerinfo.identifier);
ssl_dump_error_stack(this->name);
free_ssl:
SSL_free(priv->ssl_ssl);
--
1.7.1