]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Torrents are not supported for objects encrypted using SSE-C 18431/head
authorZhang Shaowen <zhangshaowen@cmss.chinamobile.com>
Tue, 26 Sep 2017 02:00:59 +0000 (10:00 +0800)
committerAbhishek Lekshmanan <abhishek@suse.com>
Fri, 20 Oct 2017 14:48:31 +0000 (16:48 +0200)
Fixes: http://tracker.ceph.com/issues/21720
Signed-off-by: Zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
(cherry picked from commit 9a8ae664da54eb74e74a12cc16a52b0df7df70a0)

src/rgw/rgw_op.cc

index f7e5caf67f51dd45763bc8c3eec39391ab2ae005..73ea66607594f2bb32943a32dc0b00db54538a2d 100644 (file)
@@ -1638,6 +1638,11 @@ void RGWGetObj::execute()
   /* start gettorrent */
   if (torrent.get_flag())
   {
+    attr_iter = attrs.find(RGW_ATTR_CRYPT_MODE);
+    if (attr_iter != attrs.end() && attr_iter->second.to_str() == "SSE-C-AES256") {
+      op_ret = -ERR_INVALID_REQUEST;
+      goto done_err;
+    }
     torrent.init(s, store);
     op_ret = torrent.get_torrent_file(read_op, total_len, bl, obj);
     if (op_ret < 0)