From: Casey Bodley Date: Thu, 16 Nov 2023 01:17:54 +0000 (-0500) Subject: rgw/acl: remove unused virtual compare_group_name() X-Git-Tag: v19.0.0~9^2~21 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=323114e7330648f0d96b6c215fa42f0a690a225d;p=ceph.git rgw/acl: remove unused virtual compare_group_name() that was the only virtual function, so remove virtual destructors too Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_acl.h b/src/rgw/rgw_acl.h index f2dacf285432..ff9de6c81ffb 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 46a427572be0..4700f0996514 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 c58307600d44..96480ff8bdd8 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 4cb1e4b8f8f5..fee32ae06abf 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,