From 323114e7330648f0d96b6c215fa42f0a690a225d Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Wed, 15 Nov 2023 20:17:54 -0500 Subject: [PATCH] rgw/acl: remove unused virtual compare_group_name() that was the only virtual function, so remove virtual destructors too Signed-off-by: Casey Bodley --- src/rgw/rgw_acl.h | 4 +--- src/rgw/rgw_acl_s3.cc | 15 --------------- src/rgw/rgw_acl_s3.h | 1 - src/rgw/rgw_acl_swift.h | 2 -- 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/rgw/rgw_acl.h b/src/rgw/rgw_acl.h index f2dacf2854324..ff9de6c81ffbe 100644 --- a/src/rgw/rgw_acl.h +++ b/src/rgw/rgw_acl.h @@ -283,7 +283,7 @@ public: ACLGrantMap& get_grant_map() { return grant_map; } const ACLGrantMap& get_grant_map() const { return grant_map; } - void create_default(const rgw_user& id, std::string name) { + void create_default(const rgw_user& id, const std::string& name) { acl_user_map.clear(); acl_group_map.clear(); referer_list.clear(); @@ -336,7 +336,6 @@ protected: public: explicit RGWAccessControlPolicy(CephContext *_cct) : cct(_cct), acl(_cct) {} RGWAccessControlPolicy() : cct(NULL), acl(NULL) {} - virtual ~RGWAccessControlPolicy() {} void set_ctx(CephContext *ctx) { cct = ctx; @@ -391,7 +390,6 @@ public: return acl; } - virtual bool compare_group_name(std::string& id, ACLGroupTypeEnum group) { return false; } bool is_public(const DoutPrefixProvider *dpp) const; friend bool operator==(const RGWAccessControlPolicy& lhs, const RGWAccessControlPolicy& rhs); diff --git a/src/rgw/rgw_acl_s3.cc b/src/rgw/rgw_acl_s3.cc index 46a427572be0f..4700f09965142 100644 --- a/src/rgw/rgw_acl_s3.cc +++ b/src/rgw/rgw_acl_s3.cc @@ -589,21 +589,6 @@ int RGWAccessControlPolicy_S3::rebuild(const DoutPrefixProvider *dpp, return 0; } -bool RGWAccessControlPolicy_S3::compare_group_name(string& id, ACLGroupTypeEnum group) -{ - switch (group) { - case ACL_GROUP_ALL_USERS: - return (id.compare(RGW_USER_ANON_ID) == 0); - case ACL_GROUP_AUTHENTICATED_USERS: - return (id.compare(rgw_uri_auth_users) == 0); - default: - return id.empty(); - } - - // shouldn't get here - return false; -} - XMLObj *RGWACLXMLParser_S3::alloc_obj(const char *el) { XMLObj * obj = NULL; diff --git a/src/rgw/rgw_acl_s3.h b/src/rgw/rgw_acl_s3.h index c58307600d444..96480ff8bdd8e 100644 --- a/src/rgw/rgw_acl_s3.h +++ b/src/rgw/rgw_acl_s3.h @@ -85,7 +85,6 @@ public: void to_xml(std::ostream& out); int rebuild(const DoutPrefixProvider *dpp, rgw::sal::Driver* driver, ACLOwner *owner, RGWAccessControlPolicy& dest, std::string &err_msg); - bool compare_group_name(std::string& id, ACLGroupTypeEnum group) override; virtual int create_canned(ACLOwner& _owner, ACLOwner& bucket_owner, const std::string& canned_acl) { RGWAccessControlList_S3& _acl = static_cast(acl); diff --git a/src/rgw/rgw_acl_swift.h b/src/rgw/rgw_acl_swift.h index 4cb1e4b8f8f57..fee32ae06abf2 100644 --- a/src/rgw/rgw_acl_swift.h +++ b/src/rgw/rgw_acl_swift.h @@ -24,7 +24,6 @@ public: explicit RGWAccessControlPolicy_SWIFT(CephContext* const cct) : RGWAccessControlPolicy(cct) { } - ~RGWAccessControlPolicy_SWIFT() override = default; int create(const DoutPrefixProvider *dpp, rgw::sal::Driver* driver, @@ -43,7 +42,6 @@ public: explicit RGWAccessControlPolicy_SWIFTAcct(CephContext * const cct) : RGWAccessControlPolicy(cct) { } - ~RGWAccessControlPolicy_SWIFTAcct() override {} void add_grants(const DoutPrefixProvider *dpp, rgw::sal::Driver* driver, -- 2.39.5