summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2016-01-21 12:41:55 +0530
committerRaghavendra G <rgowdapp@redhat.com>2016-01-22 00:52:20 -0800
commit16f6579cb3e1214b1386fb530b8e16c8cbfdef33 (patch)
tree5a4fffe95e5f20348b24c696c0d8a23b4ae1cfe3 /xlators/protocol
parent30ef018c00b0d1be5d590c9518c159a7946d040e (diff)
protocol/server: Race between server_reconfigure and server_setvolume
During server_reconfigure we authenticate each connected clients against the current options. To do this authentication we store previous values in a dictionary during the connection establishment phase (server_setvolume). If the authentication fails during reconfigure then we will disconnect the transport. Here it introduce a race between server_setvolume and reconfugure. If a reconfigure called before doing a setvolume, the transport will be disconnected Change-Id: Icce2c28a171481327a06efd3901f8a5ee67b05ab BUG: 1300564 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13271 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/server/src/server.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index 3a4a81d349c..d07b840b3fc 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -822,6 +822,18 @@ reconfigure (xlator_t *this, dict_t *options)
{
list_for_each_entry (xprt, &conf->xprt_list, list) {
/* check for client authorization */
+ if (!xprt->clnt_options) {
+ /* If clnt_options dictionary is null,
+ * which means for this transport
+ * server_setvolume was not called.
+ *
+ * So here we can skip authentication
+ * because server_setvolume will do
+ * gf_authenticate.
+ *
+ */
+ continue;
+ }
ret = gf_authenticate (xprt->clnt_options,
options, conf->auth_modules);
if (ret == AUTH_ACCEPT) {