return op_ret;
}
int read_len;
- int r = s->cio->read(data, cl, &read_len);
+ int r = s->cio->read(data, cl, &read_len, s->aws4_auth_needs_complete);
len = read_len;
if (r < 0)
return r;
int read_len = 0, len = 0;
do {
- int r = s->cio->read(data + len, need_to_read, &read_len);
+ int r = s->cio->read(data + len, need_to_read, &read_len, s->aws4_auth_needs_complete);
if (r < 0) {
free(data);
return r;
if (!data) {
return -ENOMEM;
}
- int ret = s->cio->read(data, cl, &len);
+ int ret = s->cio->read(data, cl, &len, s->aws4_auth_needs_complete);
if (ret < 0) {
free(data);
return ret;
return op_ret;
}
int read_len;
- op_ret = s->cio->read(data, cl, &read_len);
+ op_ret = s->cio->read(data, cl, &read_len, s->aws4_auth_needs_complete);
len = read_len;
if (op_ret < 0)
return op_ret;
RGWCompleteMultipart_ObjStore() {}
~RGWCompleteMultipart_ObjStore() {}
- int get_params();
+ virtual int get_params();
};
class RGWAbortMultipart_ObjStore : public RGWAbortMultipart {
RGWDeleteMultiObj_ObjStore() {}
~RGWDeleteMultiObj_ObjStore() {}
- int get_params();
+ virtual int get_params();
};
class RGWRESTOp : public RGWOp {
return r;
}
+ if (s->aws4_auth_needs_complete) {
+ int ret_auth = do_aws4_auth_completion();
+ if (ret_auth < 0) {
+ return ret_auth;
+ }
+ }
+
RGWSetBucketVersioningParser parser;
if (!parser.init()) {
if ((op_ret < 0) && (op_ret != -ERR_LENGTH_REQUIRED))
return op_ret;
+ if (s->aws4_auth_needs_complete) {
+ int ret_auth = do_aws4_auth_completion();
+ if (ret_auth < 0) {
+ return ret_auth;
+ }
+ }
+
bufferptr in_ptr(data, len);
in_data.append(in_ptr);
s->aws4_auth_needs_complete = false;
if ((ret == 0) && s->aws4_auth_needs_complete) {
int ret_auth = do_aws4_auth_completion();
- if (ret_auth)
+ if (ret_auth < 0) {
return ret_auth;
+ }
}
return ret;
}
s->aws4_auth_needs_complete = false;
if (s->aws4_auth_needs_complete) {
int ret_auth = do_aws4_auth_completion();
- if (ret_auth)
+ if (ret_auth < 0) {
return ret_auth;
+ }
}
return ret;
}
goto done_err;
}
int read_len;
- r = s->cio->read(data, cl, &read_len);
+ r = s->cio->read(data, cl, &read_len, s->aws4_auth_needs_complete);
len = read_len;
if (r < 0)
goto done_err;
len = 0;
}
+ if (s->aws4_auth_needs_complete) {
+ int ret_auth = do_aws4_auth_completion();
+ if (ret_auth < 0) {
+ return ret_auth;
+ }
+ }
+
if (!parser.init()) {
r = -EINVAL;
goto done_err;
}
}
+int RGWCompleteMultipart_ObjStore_S3::get_params()
+{
+ int ret = RGWCompleteMultipart_ObjStore::get_params();
+ if (ret < 0) {
+ return ret;
+ }
+
+ if (s->aws4_auth_needs_complete) {
+ int ret_auth = do_aws4_auth_completion();
+ if (ret_auth < 0) {
+ return ret_auth;
+ }
+ }
+ return 0;
+}
+
void RGWCompleteMultipart_ObjStore_S3::send_response()
{
if (op_ret)
rgw_flush_formatter_and_reset(s, s->formatter);
}
+int RGWDeleteMultiObj_ObjStore_S3::get_params()
+{
+ int ret = RGWDeleteMultiObj_ObjStore::get_params();
+ if (ret < 0) {
+ return ret;
+ }
+
+ if (s->aws4_auth_needs_complete) {
+ int ret_auth = do_aws4_auth_completion();
+ if (ret_auth < 0) {
+ return ret_auth;
+ }
+ }
+ return 0;
+}
+
void RGWDeleteMultiObj_ObjStore_S3::send_status()
{
if (! status_dumped) {
switch (s->op_type)
{
+ case RGW_OP_CREATE_BUCKET:
case RGW_OP_PUT_OBJ:
case RGW_OP_PUT_ACLS:
- /* ops requiring aws4 completion but not implemented yet */
- //case RGW_OP_PUT_CORS:
- //case RGW_OP_COMPLETE_MULTIPART:
- //case RGW_OP_SET_BUCKET_VERSIONING:
- //case RGW_OP_DELETE_MULTI_OBJ:
+ case RGW_OP_PUT_CORS:
+ case RGW_OP_COMPLETE_MULTIPART:
+ case RGW_OP_SET_BUCKET_VERSIONING:
+ case RGW_OP_DELETE_MULTI_OBJ:
+ case RGW_OP_ADMIN_SET_METADATA:
break;
default:
dout(10) << "ERROR: AWS4 completion for this operation NOT IMPLEMENTED" << dendl;