From: Sage Weil Date: Tue, 7 Aug 2018 17:51:37 +0000 (-0500) Subject: mon/AuthMonitor: do not share monmap until authenticated X-Git-Tag: v14.0.1~464^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5cf69712f239f1c759a3b009ea6ddb7047f9854e;p=ceph.git mon/AuthMonitor: do not share monmap until authenticated Reported-by: Christopher Ryan Harrell Signed-off-by: Sage Weil --- diff --git a/src/mon/AuthMonitor.cc b/src/mon/AuthMonitor.cc index cfa55aa3febe..039380f8c6c8 100644 --- a/src/mon/AuthMonitor.cc +++ b/src/mon/AuthMonitor.cc @@ -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: