Skip to content

Commit

Permalink
Merge pull request ceph#34462 from inspur-wyq/wip-44987
Browse files Browse the repository at this point in the history
rgw: belong the anonymous object to the bucket owner

Reviewed-by: Casey Bodley <[email protected]>
  • Loading branch information
ivancich authored Dec 1, 2020
2 parents fe054e0 + e6f9aed commit 9d973a0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/rgw/rgw_acl_s3.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,12 @@ class RGWAccessControlPolicy_S3 : public RGWAccessControlPolicy, public XMLObj

virtual int create_canned(ACLOwner& _owner, ACLOwner& bucket_owner, const string& canned_acl) {
RGWAccessControlList_S3& _acl = static_cast<RGWAccessControlList_S3 &>(acl);
int ret = _acl.create_canned(_owner, bucket_owner, canned_acl);
owner = _owner;
if (_owner.get_id() == rgw_user("anonymous")) {
owner = bucket_owner;
} else {
owner = _owner;
}
int ret = _acl.create_canned(owner, bucket_owner, canned_acl);
return ret;
}
int create_from_headers(RGWUserCtl *user_ctl, const RGWEnv *env, ACLOwner& _owner);
Expand Down

0 comments on commit 9d973a0

Please sign in to comment.