From: Abhishek Lekshmanan Date: Thu, 23 Jul 2020 09:51:24 +0000 (+0200) Subject: rgw: s3: mark bucket encryption as not implemented X-Git-Tag: v16.1.0~1474^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cf4cf2c1b735cabc5ccb5d13215a7b85ee68fd2e;p=ceph.git rgw: s3: mark bucket encryption as not implemented Currently otherwise this op in deletion would delete the bucket instead Fixes: https://tracker.ceph.com/issues/46263 Signed-off-by: Abhishek Lekshmanan --- diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 3615f781af26..fd413b53bfce 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -4378,6 +4378,9 @@ RGWOp *RGWHandler_REST_Bucket_S3::get_obj_op(bool get_data) const RGWOp *RGWHandler_REST_Bucket_S3::op_get() { + if (s->info.args.sub_resource_exists("encryption")) + return nullptr; + if (s->info.args.sub_resource_exists("logging")) return new RGWGetBucketLogging_ObjStore_S3; @@ -4438,8 +4441,9 @@ RGWOp *RGWHandler_REST_Bucket_S3::op_head() RGWOp *RGWHandler_REST_Bucket_S3::op_put() { - if (s->info.args.sub_resource_exists("logging")) - return NULL; + if (s->info.args.sub_resource_exists("logging") || + s->info.args.sub_resource_exists("encryption")) + return nullptr; if (s->info.args.sub_resource_exists("versioning")) return new RGWSetBucketVersioning_ObjStore_S3; if (s->info.args.sub_resource_exists("website")) { @@ -4480,6 +4484,10 @@ RGWOp *RGWHandler_REST_Bucket_S3::op_put() RGWOp *RGWHandler_REST_Bucket_S3::op_delete() { + if (s->info.args.sub_resource_exists("logging") || + s->info.args.sub_resource_exists("encryption")) + return nullptr; + if (is_tagging_op()) { return new RGWDeleteBucketTags_ObjStore_S3; } else if (is_cors_op()) {