From: Casey Bodley Date: Thu, 18 Jan 2018 19:53:35 +0000 (-0500) Subject: rgw: unlink deleted bucket from bucket's owner X-Git-Tag: v12.2.3~8^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F20357%2Fhead;p=ceph.git rgw: unlink deleted bucket from bucket's owner if a bucket is deleted by an admin/system user instead of its owner, the unlink would fail and the deleted bucket remained visible to the original owner Fixes: http://tracker.ceph.com/issues/22248 Signed-off-by: Casey Bodley (cherry picked from commit 4701e85a3ea72852a61a106724fa22497f3d5789) --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index b1b19d0c6d8d..acb741d128ef 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -2941,7 +2941,7 @@ void RGWDeleteBucket::execute() } if (op_ret == 0) { - op_ret = rgw_unlink_bucket(store, s->user->user_id, s->bucket.tenant, + op_ret = rgw_unlink_bucket(store, s->bucket_info.owner, s->bucket.tenant, s->bucket.name, false); if (op_ret < 0) { ldout(s->cct, 0) << "WARNING: failed to unlink bucket: ret=" << op_ret