From a3c40b345fcb01597ce6e7ef448d038ee4e8d9ee Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 19 Sep 2018 11:35:42 -0500 Subject: [PATCH] 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 --- src/osd/OSD.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/osd/OSD.h b/src/osd/OSD.h index c6b3faf5002b5..cdd920dd02e98 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: -- 2.39.5