From: Ilsoo Byun Date: Fri, 11 Dec 2020 00:57:49 +0000 (+0900) Subject: rgw: return error when trying to copy encrypted object without key X-Git-Tag: v14.2.22~22^2~10^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5b066af62164efe2527c3734a4b62e408feab393;p=ceph.git rgw: return error when trying to copy encrypted object without key Fixes: https://tracker.ceph.com/issues/48554 Signed-off-by: Ilsoo Byun (cherry picked from commit dde1303c92b39daa2d760a110f48dc9655e7765f) --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index c2501b7842a4..6addf415ec89 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -3604,7 +3604,7 @@ int RGWPutObj::get_data(const off_t fst, const off_t lst, bufferlist& bl) filter = decrypt.get(); } if (op_ret < 0) { - return ret; + return op_ret; } ret = read_op.range_to_ofs(obj_size, new_ofs, new_end);