From: Yehuda Sadeh Date: Wed, 16 Jan 2013 23:01:47 +0000 (-0800) Subject: rgw: copy object should not copy source acls X-Git-Tag: v0.57~157^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=37dbf7d9df93dd0e92019be31eaa1a19dd9569c7;p=ceph.git 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 --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 70220b4176d0..d75b0d8a8e55 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;