handle_ping(static_cast<MPing*>(m));
break;
+ /* MMonGetMap may be used by clients to obtain a monmap *before*
+ * authenticating with the monitor. We need to handle these without
+ * checking caps because, even on a cluster without cephx, we only set
+ * session caps *after* the auth handshake. A good example of this
+ * is when a client calls MonClient::get_monmap_privately(), which does
+ * not authenticate when obtaining a monmap.
+ */
+ case CEPH_MSG_MON_GET_MAP:
+ handle_mon_get_map(static_cast<MMonGetMap*>(m));
+ break;
+
default:
dealt_with = false;
break;
switch (m->get_type()) {
// misc
- case CEPH_MSG_MON_GET_MAP:
- handle_mon_get_map(static_cast<MMonGetMap*>(m));
- break;
-
case CEPH_MSG_MON_GET_VERSION:
handle_get_version(static_cast<MMonGetVersion*>(m));
break;