diff options
author | Seena Fallah <seenafallah@gmail.com> | 2025-01-08 22:24:16 +0100 |
---|---|---|
committer | Seena Fallah <seenafallah@gmail.com> | 2025-01-08 22:24:16 +0100 |
commit | b18b5491bae83b485ab88fde33a064deba231af9 (patch) | |
tree | bb53d2995f5563e6413cfe0236e19d6304223c77 | |
parent | Merge pull request #60848 from cbodley/wip-rgw-deprecate-iam-tenant (diff) | |
download | ceph-b18b5491bae83b485ab88fde33a064deba231af9.tar.xz ceph-b18b5491bae83b485ab88fde33a064deba231af9.zip |
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 <seenafallah@gmail.com>
-rw-r--r-- | src/rgw/driver/rados/rgw_data_sync.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rgw/driver/rados/rgw_data_sync.cc b/src/rgw/driver/rados/rgw_data_sync.cc index c0a9059a251..22e08c039f3 100644 --- a/src/rgw/driver/rados/rgw_data_sync.cc +++ b/src/rgw/driver/rados/rgw_data_sync.cc @@ -3021,7 +3021,7 @@ public: if (!dest_bucket_perms.verify_bucket_permission(dest_key.value_or(key), rgw::IAM::s3PutObject)) { ldout(cct, 0) << "ERROR: " << __func__ << ": permission check failed: user not allowed to write into bucket (bucket=" << sync_pipe.info.dest_bucket.get_key() << ")" << dendl; - return -EPERM; + return set_cr_error(-EPERM); } } |