Skip to content

Commit b18b549

Browse files
committed
rgw: set retcode on verify_bucket_permission in RGWObjFetchCR
On destination bucket `verify_bucket_permission()` in `RGWObjFetchCR()` use `set_cr_error()` to return `-EPERM` so it can be reflected in `RGWBucketSyncSingleEntryCR()` for skipping on `-EPERM`. Fixes: https://tracker.ceph.com/issues/69450 Signed-off-by: Seena Fallah <[email protected]>
1 parent 093e0de commit b18b549

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rgw/driver/rados/rgw_data_sync.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3021,7 +3021,7 @@ class RGWObjFetchCR : public RGWCoroutine {
30213021

30223022
if (!dest_bucket_perms.verify_bucket_permission(dest_key.value_or(key), rgw::IAM::s3PutObject)) {
30233023
ldout(cct, 0) << "ERROR: " << __func__ << ": permission check failed: user not allowed to write into bucket (bucket=" << sync_pipe.info.dest_bucket.get_key() << ")" << dendl;
3024-
return -EPERM;
3024+
return set_cr_error(-EPERM);
30253025
}
30263026
}
30273027

0 commit comments

Comments
 (0)