From df399da120afa0a4cdac7a7b07dce53b911323fb Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 16 Jan 2013 15:01:47 -0800 Subject: [PATCH] rgw: copy object should not copy source acls Fixes: #3802 Backport: argonaut, bobtail When using the S3 api and x-amz-metadata-directive is set to COPY we used to copy complete metadata of source object. However, this shouldn't include the source ACLs. Conflicts: src/rgw/rgw_rados.cc Signed-off-by: Yehuda Sadeh (cherry picked from commit ccfefe3097a51b49885f2ed5d9334e85b497d963) --- src/rgw/rgw_rados.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 08c28fba4c8fa..9592d438b54ff 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -1131,6 +1131,9 @@ int RGWRados::copy_obj(void *ctx, attrs[RGW_ATTR_ETAG] = attrset[RGW_ATTR_ETAG]; attrset = attrs; + } else { + /* copying attrs from source, however acls should not be copied */ + attrset[RGW_ATTR_ACL] = attrs[RGW_ATTR_ACL]; } ret = rgwstore->put_obj_meta(ctx, dest_obj, end + 1, NULL, attrset, category, false, NULL, &first_chunk, &manifest); -- 2.39.5