From f1c9bc6340b18059196f99a02bf1606b524344f6 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 --- 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 026a36fb888..0fa026ee332 100644 --- a/src/auth/cephx/CephxKeyServer.cc +++ b/src/auth/cephx/CephxKeyServer.cc @@ -293,21 +293,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 b21b815f7d5..211277ad88d 100644 --- a/src/auth/cephx/CephxKeyServer.h +++ b/src/auth/cephx/CephxKeyServer.h @@ -277,8 +277,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