]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: copy object should not copy source acls
authorYehuda Sadeh <yehuda@inktank.com>
Wed, 16 Jan 2013 23:01:47 +0000 (15:01 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Wed, 16 Jan 2013 23:22:20 +0000 (15:22 -0800)
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>
src/rgw/rgw_rados.cc

index 70220b4176d0d14547f22f2fedb23e500864fa11..d75b0d8a8e558fe09441c24b501aee0c50fb2ee0 100644 (file)
@@ -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;