]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/AuthMonitor: do not share monmap until authenticated
authorSage Weil <sage@redhat.com>
Tue, 7 Aug 2018 17:51:37 +0000 (12:51 -0500)
committerSage Weil <sage@redhat.com>
Mon, 27 Aug 2018 17:02:00 +0000 (12:02 -0500)
Reported-by: Christopher Ryan Harrell <harrellcr@email.arizona.edu>
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/AuthMonitor.cc

index cfa55aa3febe3a0e11c1cbc02a9de3fbc99dbd7b..039380f8c6c861879a949f649ea8a1e5c7bb8d63 100644 (file)
@@ -591,11 +591,6 @@ bool AuthMonitor::prep_auth(MonOpRequestRef op, bool paxos_writable)
     uint64_t auid = 0;
     if (start) {
       // new session
-
-      // always send the latest monmap.
-      if (m->monmap_epoch < mon->monmap->get_epoch())
-       mon->send_latest_monmap(m->get_connection().get());
-
       proto = s->auth_handler->start_session(entity_name, indata, response_bl, caps_info);
       ret = 0;
       if (caps_info.allow_all) {
@@ -633,6 +628,10 @@ reply:
   reply = new MAuthReply(proto, &response_bl, ret, s->global_id);
   mon->send_reply(op, reply);
   if (finished) {
+    // always send the latest monmap.
+    if (m->monmap_epoch < mon->monmap->get_epoch())
+      mon->send_latest_monmap(m->get_connection().get());
+
     mon->configmon()->check_sub(s);
   }
 done: