diff options
author | Yehuda Sadeh <yehuda@inktank.com> | 2013-01-16 15:01:47 -0800 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2013-01-16 16:59:33 -0800 |
commit | df399da120afa0a4cdac7a7b07dce53b911323fb (patch) | |
tree | 4adc0f662f48b4edbffc8db521a1f26c86fe1816 | |
parent | 830b8ffa2e53fde37b74de12a053e037ff3f15b0 (diff) | |
download | ceph-df399da120afa0a4cdac7a7b07dce53b911323fb.tar.gz |
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 <yehuda@inktank.com>
(cherry picked from commit ccfefe3097a51b49885f2ed5d9334e85b497d963)
-rw-r--r-- | src/rgw/rgw_rados.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 08c28fba4c8..9592d438b54 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); |