]> 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)
committerJoao Eduardo Luis <joao@redhat.com>
Mon, 17 Nov 2014 15:40:42 +0000 (15:40 +0000)
Backport: giant

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
src/mon/Monitor.cc
src/mon/Session.h

index ba4acbda02acc9e4b15f52ad13cf3f556fc19e55..a0229aed8102a4a52ce78b800ec4dafa467e6f52 100644 (file)
@@ -3038,7 +3038,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
@@ -3109,7 +3108,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;