summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2013-01-16 15:01:47 -0800
committerYehuda Sadeh <yehuda@inktank.com>2013-01-16 15:22:20 -0800
commit37dbf7d9df93dd0e92019be31eaa1a19dd9569c7 (patch)
treeb6722e3fb485cb8755b45b76597b51e0dcb460b7
parent3610e72e4f9117af712f34a2e12c5e9537a5746f (diff)
downloadceph-37dbf7d9df93dd0e92019be31eaa1a19dd9569c7.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. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r--src/rgw/rgw_rados.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc
index 70220b4176d..d75b0d8a8e5 100644
--- a/src/rgw/rgw_rados.cc
+++ b/src/rgw/rgw_rados.cc
@@ -1260,6 +1260,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];
}
RGWObjManifest manifest;