From 37dbf7d9df93dd0e92019be31eaa1a19dd9569c7 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. Signed-off-by: Yehuda Sadeh --- 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 70220b4176d0d..d75b0d8a8e558 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; -- 2.39.5