From: Daniel Gryniewicz Date: Wed, 23 Jun 2021 15:31:22 +0000 (-0400) Subject: RGW - Bucket Remove Op: Pass in user X-Git-Tag: v17.1.0~1557^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a77775caa40bac2ac26d2ef724f4c809375ae045;p=ceph.git RGW - Bucket Remove Op: Pass in user When a bucket remove op is called on the non-master zone, the op is forwarded to the master zone, but this needs a user, so pass the user in. Signed-off-by: Daniel Gryniewicz --- diff --git a/src/rgw/rgw_rest_bucket.cc b/src/rgw/rgw_rest_bucket.cc index 8b2e68586c0b..18eb32281589 100644 --- a/src/rgw/rgw_rest_bucket.cc +++ b/src/rgw/rgw_rest_bucket.cc @@ -219,7 +219,9 @@ void RGWOp_Bucket_Remove::execute(optional_yield y) RESTArgs::get_string(s, "bucket", bucket_name, &bucket_name); RESTArgs::get_bool(s, "purge-objects", false, &delete_children); - op_ret = store->get_bucket(s, nullptr, string(), bucket_name, &bucket, y); + /* FIXME We're abusing the owner of the bucket to pass the user, so that it can be forwarded to + * the master. This user is actually the OP caller, not the bucket owner. */ + op_ret = store->get_bucket(s, s->user.get(), string(), bucket_name, &bucket, y); if (op_ret < 0) { ldpp_dout(this, 0) << "get_bucket returned ret=" << op_ret << dendl; return;