]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Monitor: stash auth entity name in session
authorJoao Eduardo Luis <joao@redhat.com>
Fri, 14 Nov 2014 21:03:54 +0000 (21:03 +0000)
committerLoic Dachary <ldachary@redhat.com>
Wed, 11 Mar 2015 07:36:00 +0000 (08:36 +0100)
Backport: giant

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
(cherry picked from commit ca8e1efc0be9bffcfbdce5593526d257aa498062)

src/mon/Monitor.cc
src/mon/Session.h

index ad35e5ed39c08faa329989e95bd5e7ee36d93ab1..ee4bd039b101749350ac341e7f9e7e4b426530ed 100644 (file)
@@ -2869,7 +2869,6 @@ bool Monitor::_ms_dispatch(Message *m)
   ConnectionRef connection = m->get_connection();
   MonSession *s = NULL;
   MonCap caps;
-  EntityName entity_name;
   bool src_is_mon;
 
   // regardless of who we are or who the sender is, the message must
@@ -2937,7 +2936,7 @@ bool Monitor::_ms_dispatch(Message *m)
 
   if (s) {
     if (s->auth_handler) {
-      entity_name = s->auth_handler->get_entity_name();
+      s->entity_name = s->auth_handler->get_entity_name();
     }
     dout(20) << " caps " << s->caps.get_str() << dendl;
   }
index a5f67d9e2daceeaba0fe104c4c5df16b82982e5d..6aedac9e982dc164f188d75e3de86f3589783844 100644 (file)
@@ -53,6 +53,7 @@ struct MonSession : public RefCountedObject {
   map<string, Subscription*> sub_map;
 
   AuthServiceHandler *auth_handler;
+  EntityName entity_name;
 
   ConnectionRef proxy_con;
   uint64_t proxy_tid;