]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: reject encrypted object COPY before supported 20937/head
authorJeegn Chen <jeegnchen@gmail.com>
Tue, 6 Mar 2018 05:20:07 +0000 (13:20 +0800)
committerPrashant D <pdhange@redhat.com>
Fri, 16 Mar 2018 09:12:29 +0000 (05:12 -0400)
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>
(cherry picked from commit a1513efe21af694e04db466a4d1d63cfd857876e)

src/rgw/rgw_rados.cc

index 78ea99ed7a9b556f2c56c1381dbf69a117b41928..c03f9f4659831704e78311e9718583fda7a75286 100644 (file)
@@ -8102,6 +8102,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);