]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: unlink deleted bucket from bucket's owner 20357/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 18 Jan 2018 19:53:35 +0000 (14:53 -0500)
committerPrashant D <pdhange@redhat.com>
Thu, 8 Feb 2018 01:23:51 +0000 (20:23 -0500)
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 <cbodley@redhat.com>
(cherry picked from commit 4701e85a3ea72852a61a106724fa22497f3d5789)

src/rgw/rgw_op.cc

index b1b19d0c6d8d488c8417feeead71404dc4562a35..acb741d128ef4605a10d8b058a4e191a4fd5c9da 100644 (file)
@@ -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