From 5d75e468a1e0317dbd6f97e4265a1ad4614fcbf5 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Tue, 9 Mar 2021 14:25:39 +0100 Subject: [PATCH] auth/AuthServiceHandler: drop unused start_session() args session_key, connection_secret and connection_secret_required_length aren't material for start_session() across all three implementations. Signed-off-by: Ilya Dryomov (cherry picked from commit c151c9659bdb71f30b520bbd62f91cc009ec51cd) --- src/auth/AuthServiceHandler.h | 5 +---- src/auth/cephx/CephxServiceHandler.cc | 5 +---- src/auth/cephx/CephxServiceHandler.h | 5 +---- src/auth/krb/KrbServiceHandler.cpp | 5 +---- src/auth/krb/KrbServiceHandler.hpp | 5 +---- src/auth/none/AuthNoneServiceHandler.h | 5 +---- src/mon/AuthMonitor.cc | 4 +--- src/mon/Monitor.cc | 5 +---- 8 files changed, 8 insertions(+), 31 deletions(-) diff --git a/src/auth/AuthServiceHandler.h b/src/auth/AuthServiceHandler.h index ac33eaa242594..a6dfe019817d1 100644 --- a/src/auth/AuthServiceHandler.h +++ b/src/auth/AuthServiceHandler.h @@ -37,11 +37,8 @@ public: virtual ~AuthServiceHandler() { } virtual int start_session(const EntityName& name, - size_t connection_secret_required_length, ceph::buffer::list *result, - AuthCapsInfo *caps, - CryptoKey *session_key, - std::string *connection_secret) = 0; + AuthCapsInfo *caps) = 0; virtual int handle_request(ceph::buffer::list::const_iterator& indata, size_t connection_secret_required_length, ceph::buffer::list *result, diff --git a/src/auth/cephx/CephxServiceHandler.cc b/src/auth/cephx/CephxServiceHandler.cc index 1f4d22a6134b0..129dd96465ee7 100644 --- a/src/auth/cephx/CephxServiceHandler.cc +++ b/src/auth/cephx/CephxServiceHandler.cc @@ -37,11 +37,8 @@ using ceph::encode; int CephxServiceHandler::start_session( const EntityName& name, - size_t connection_secret_required_length, bufferlist *result_bl, - AuthCapsInfo *caps, - CryptoKey *session_key, - std::string *connection_secret) + AuthCapsInfo *caps) { entity_name = name; diff --git a/src/auth/cephx/CephxServiceHandler.h b/src/auth/cephx/CephxServiceHandler.h index 0ab14ff5dafa6..42a4fddcd97f1 100644 --- a/src/auth/cephx/CephxServiceHandler.h +++ b/src/auth/cephx/CephxServiceHandler.h @@ -30,11 +30,8 @@ public: ~CephxServiceHandler() override {} int start_session(const EntityName& name, - size_t connection_secret_required_length, ceph::buffer::list *result_bl, - AuthCapsInfo *caps, - CryptoKey *session_key, - std::string *connection_secret) override; + AuthCapsInfo *caps) override; int handle_request( ceph::buffer::list::const_iterator& indata, size_t connection_secret_required_length, diff --git a/src/auth/krb/KrbServiceHandler.cpp b/src/auth/krb/KrbServiceHandler.cpp index 3bd679d0ab5f4..be1510cd621af 100644 --- a/src/auth/krb/KrbServiceHandler.cpp +++ b/src/auth/krb/KrbServiceHandler.cpp @@ -154,11 +154,8 @@ int KrbServiceHandler::handle_request( int KrbServiceHandler::start_session( const EntityName& name, - size_t connection_secret_required_length, bufferlist *buff_list, - AuthCapsInfo *caps, - CryptoKey *session_key, - std::string *connection_secret) + AuthCapsInfo *caps) { gss_buffer_desc gss_buffer_in = {0, nullptr}; gss_OID gss_object_id = GSS_C_NT_HOSTBASED_SERVICE; diff --git a/src/auth/krb/KrbServiceHandler.hpp b/src/auth/krb/KrbServiceHandler.hpp index 672efc54638bd..c1179cc3f0cd2 100644 --- a/src/auth/krb/KrbServiceHandler.hpp +++ b/src/auth/krb/KrbServiceHandler.hpp @@ -46,11 +46,8 @@ class KrbServiceHandler : public AuthServiceHandler { std::string *connection_secret) override; int start_session(const EntityName& name, - size_t connection_secret_required_length, bufferlist *buff_list, - AuthCapsInfo *caps, - CryptoKey *session_key, - std::string *connection_secret) override; + AuthCapsInfo *caps) override; private: gss_buffer_desc m_gss_buffer_out; diff --git a/src/auth/none/AuthNoneServiceHandler.h b/src/auth/none/AuthNoneServiceHandler.h index b49b310eec3db..548d19196cfcd 100644 --- a/src/auth/none/AuthNoneServiceHandler.h +++ b/src/auth/none/AuthNoneServiceHandler.h @@ -26,11 +26,8 @@ public: ~AuthNoneServiceHandler() override {} int start_session(const EntityName& name, - size_t connection_secret_required_length, ceph::buffer::list *result_bl, - AuthCapsInfo *caps, - CryptoKey *session_key, - std::string *connection_secret) override { + AuthCapsInfo *caps) override { entity_name = name; caps->allow_all = true; return 1; diff --git a/src/mon/AuthMonitor.cc b/src/mon/AuthMonitor.cc index 660a641a4855e..d4226a93b647a 100644 --- a/src/mon/AuthMonitor.cc +++ b/src/mon/AuthMonitor.cc @@ -740,10 +740,8 @@ bool AuthMonitor::prep_auth(MonOpRequestRef op, bool paxos_writable) if (start) { // new session ret = s->auth_handler->start_session(entity_name, - 0, // no connection_secret needed &response_bl, - &s->con->peer_caps_info, - nullptr, nullptr); + &s->con->peer_caps_info); } else { // request ret = s->auth_handler->handle_request( diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 59137d6cc3ac5..b8772b53d75b3 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -6358,11 +6358,8 @@ int Monitor::handle_auth_request( r = s->auth_handler->start_session( entity_name, - auth_meta->get_connection_secret_length(), reply, - &con->peer_caps_info, - &auth_meta->session_key, - &auth_meta->connection_secret); + &con->peer_caps_info); } else { priv = con->get_priv(); if (!priv) { -- 2.39.5