From 715f611a66378e763cb5a13cb3c72c4a85e274fb Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Fri, 7 Mar 2025 13:21:44 -0500 Subject: [PATCH] auth: remove unused code Signed-off-by: Yehuda Sadeh (cherry picked from commit 334c6e66714a3e4f2e41790ee4d21f3a3ee92d5e) --- src/auth/cephx/CephxKeyServer.cc | 15 --------------- src/auth/cephx/CephxKeyServer.h | 2 -- 2 files changed, 17 deletions(-) diff --git a/src/auth/cephx/CephxKeyServer.cc b/src/auth/cephx/CephxKeyServer.cc index 2a3e5364bf5..97bbc05f2a5 100644 --- a/src/auth/cephx/CephxKeyServer.cc +++ b/src/auth/cephx/CephxKeyServer.cc @@ -290,21 +290,6 @@ bool KeyServer::generate_secret(CryptoKey& secret, std::optional key_type) return true; } -bool KeyServer::generate_secret(EntityName& name, CryptoKey& secret) -{ - if (!generate_secret(secret)) - return false; - - std::scoped_lock l{lock}; - - EntityAuth auth; - auth.key = secret; - - data.add_auth(name, auth); - - return true; -} - bool KeyServer::contains(const EntityName& name) const { std::scoped_lock l{lock}; diff --git a/src/auth/cephx/CephxKeyServer.h b/src/auth/cephx/CephxKeyServer.h index 4e3ce176309..e41ea2a74f7 100644 --- a/src/auth/cephx/CephxKeyServer.h +++ b/src/auth/cephx/CephxKeyServer.h @@ -264,8 +264,6 @@ public: bool get_service_secret(uint32_t service_id, uint64_t secret_id, CryptoKey& secret) const override; - bool generate_secret(EntityName& name, CryptoKey& secret); - void encode(ceph::buffer::list& bl) const { using ceph::encode; encode(data, bl); -- 2.39.5