]> 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, 18 Mar 2015 20:05:48 +0000 (21:05 +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 9b7cbaea392342b5f5bec9ccaf95794c7a819673..040c2f9e3bc010327b408a2b517937acccd3ae5c 100644 (file)
@@ -3088,7 +3088,6 @@ void 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
@@ -3159,7 +3158,7 @@ void 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 e794d6fdb1af9acbf613070d7c6514de3f32565e..ebe865adba98cef30650b06184ff2b1be210fda0 100644 (file)
@@ -52,6 +52,7 @@ struct MonSession : public RefCountedObject {
   map<string, Subscription*> sub_map;
 
   AuthServiceHandler *auth_handler;
+  EntityName entity_name;
 
   ConnectionRef proxy_con;
   uint64_t proxy_tid;