]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: reject encrypted object COPY before supported 20739/head
authorJeegn Chen <jeegnchen@gmail.com>
Tue, 6 Mar 2018 05:20:07 +0000 (13:20 +0800)
committerJeegn Chen <jeegnchen@gmail.com>
Mon, 12 Mar 2018 03:22:45 +0000 (11:22 +0800)
Current implementation does not follow S3 spec and even
may result in data corruption silently when copying
multipart objects accorss pools. So reject COPY operations
on encrypted objects before it is fully functional.

Fixes: http://tracker.ceph.com/issues/23232
Signed-off-by: Jeegn Chen <jeegnchen@gmail.com>
src/rgw/rgw_rados.cc

index 9594a54056d0baa71f60fb9799e4428b8e52aa4b..d0e1298be0a68cdb7b5e1da009e285b9ec813da5 100644 (file)
@@ -8097,6 +8097,15 @@ int RGWRados::copy_obj(RGWObjectCtx& obj_ctx,
   if (ret < 0) {
     return ret;
   }
+  if (src_attrs.count(RGW_ATTR_CRYPT_MODE)) {
+    // Current implementation does not follow S3 spec and even
+    // may result in data corruption silently when copying
+    // multipart objects acorss pools. So reject COPY operations
+    //on encrypted objects before it is fully functional.
+    ldout(cct, 0) << "ERROR: copy op for encrypted object " << src_obj
+                  << " has not been implemented." << dendl;
+    return -ERR_NOT_IMPLEMENTED;
+  }
 
   src_attrs[RGW_ATTR_ACL] = attrs[RGW_ATTR_ACL];
   src_attrs.erase(RGW_ATTR_DELETE_AT);