From: Sage Weil Date: Wed, 19 Sep 2018 16:35:42 +0000 (-0500) Subject: osd: authenticate ping sessions X-Git-Tag: v14.0.1~26^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a3c40b345fcb01597ce6e7ef448d038ee4e8d9ee;p=ceph.git osd: authenticate ping sessions Do not set up a Session object, though--nobody cares (currently!). This avoids having to special-case the generic authorizer validation code in msg/* to have to handle non-authenticated sessions. Also, it seems like a good idea to authenticate these sessions! Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.h b/src/osd/OSD.h index c6b3faf5002b..cdd920dd02e9 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1631,12 +1631,12 @@ public: bool ms_can_fast_dispatch_any() const override { return true; } bool ms_can_fast_dispatch(const Message *m) const override { switch (m->get_type()) { - case CEPH_MSG_PING: - case MSG_OSD_PING: - return true; - default: - return false; - } + case CEPH_MSG_PING: + case MSG_OSD_PING: + return true; + default: + return false; + } } void ms_fast_dispatch(Message *m) override { osd->heartbeat_dispatch(m); @@ -1654,6 +1654,13 @@ public: int ms_handle_authentication(Connection *con) override { return true; } + bool ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, + bool force_new) override { + return osd->ms_get_authorizer(dest_type, authorizer, force_new); + } + KeyStore *ms_get_auth1_authorizer_keystore() override { + return osd->ms_get_auth1_authorizer_keystore(); + } } heartbeat_dispatcher; private: