Merge pull request #49409 from 5cs/fix-multipart-upload-encryption

rgw/sse-s3: fix bucket encryption of multipart upload

Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
Casey Bodley 2023-04-06 09:08:51 -04:00 committed by GitHub
commit 7dd680ac8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 4 deletions

View File

@ -6275,8 +6275,10 @@ void RGWInitMultipart::execute(optional_yield y)
bufferlist aclbl, tracebl;
rgw::sal::Attrs attrs;
if (get_params(y) < 0)
op_ret = get_params(y);
if (op_ret < 0) {
return;
}
if (rgw::sal::Object::empty(s->object.get()))
return;

View File

@ -3881,10 +3881,18 @@ void RGWSetRequestPayment_ObjStore_S3::send_response()
int RGWInitMultipart_ObjStore_S3::get_params(optional_yield y)
{
int ret;
ret = get_encryption_defaults(s);
if (ret < 0) {
ldpp_dout(this, 5) << __func__ << "(): get_encryption_defaults() returned ret=" << ret << dendl;
return ret;
}
RGWAccessControlPolicy_S3 s3policy(s->cct);
op_ret = create_s3_policy(s, driver, s3policy, s->owner);
if (op_ret < 0)
return op_ret;
ret = create_s3_policy(s, driver, s3policy, s->owner);
if (ret < 0)
return ret;
policy = s3policy;