diff options
author | J. Eric Ivancich <ivancich@redhat.com> | 2025-01-17 19:14:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-17 19:14:10 +0100 |
commit | 67c7e37c7d39c4021fa144f634f2426bc2fc5aa1 (patch) | |
tree | 53e1d25edcd1260eecc40a4f9edb5300987557a7 | |
parent | Merge pull request #61157 from aiivashchenko/fix_68195 (diff) | |
parent | rgw: skip on EACCES in RGWBucketSyncSingleEntryCR (diff) | |
download | ceph-67c7e37c7d39c4021fa144f634f2426bc2fc5aa1.tar.xz ceph-67c7e37c7d39c4021fa144f634f2426bc2fc5aa1.zip |
Merge pull request #61271 from clwluvw/datasync-usermode-err
rgw: set retcode on verify_bucket_permission in RGWObjFetchCR
Reviewed-by: Casey Bodley <cbodley@redhat.com>
-rw-r--r-- | src/rgw/driver/rados/rgw_data_sync.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rgw/driver/rados/rgw_data_sync.cc b/src/rgw/driver/rados/rgw_data_sync.cc index c0a9059a251..1302f278f59 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); } } @@ -4520,7 +4520,7 @@ public: } tn->set_resource_name(SSTR(bucket_str_noinstance(bs.bucket) << "/" << key)); } - if (retcode == -ERR_PRECONDITION_FAILED || retcode == -EPERM) { + if (retcode == -ERR_PRECONDITION_FAILED || retcode == -EPERM || retcode == -EACCES) { pretty_print(sc->env, "Skipping object s3://{}/{} in sync from zone {}\n", bs.bucket.name, key, zone_name); set_status("Skipping object sync: precondition failed (object contains newer change or policy doesn't allow sync)"); |