]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: unlink deleted bucket from bucket's owner 21212/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 18 Jan 2018 19:53:35 +0000 (14:53 -0500)
committerNathan Cutler <ncutler@suse.com>
Tue, 3 Apr 2018 13:51:20 +0000 (15:51 +0200)
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 42a15e3593b754306abf21f6aa6bec872b6c1a7e..758b68c02ac85f4befd4fc5fa541201de35c441d 100644 (file)
@@ -2307,7 +2307,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