From: Javier M. Mellid Date: Wed, 13 Jan 2016 21:50:33 +0000 (+0100) Subject: rgw: add AWS4 completion support for RGW_OP_PUT_ACLS X-Git-Tag: v10.1.0~351^2^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8e1048d1427143a377db365ce085ec3f2f68ffdb;p=ceph.git rgw: add AWS4 completion support for RGW_OP_PUT_ACLS Signed-off-by: Javier M. Mellid --- diff --git a/src/rgw/rgw_rest.h b/src/rgw/rgw_rest.h index a60d9a7dbc28..e79315f4306d 100644 --- a/src/rgw/rgw_rest.h +++ b/src/rgw/rgw_rest.h @@ -245,7 +245,7 @@ public: RGWPutACLs_ObjStore() {} ~RGWPutACLs_ObjStore() {} - int get_params(); + virtual int get_params(); }; class RGWGetCORS_ObjStore : public RGWGetCORS { diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 55ef699b3710..ab9f14a5f67c 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -1713,6 +1713,19 @@ void RGWGetACLs_ObjStore_S3::send_response() s->cio->write(acls.c_str(), acls.size()); } +int RGWPutACLs_ObjStore_S3::get_params() +{ + int ret = RGWPutACLs_ObjStore::get_params(); + if (ret < 0) + s->aws4_auth_needs_complete = false; + if (s->aws4_auth_needs_complete) { + int ret_auth = do_aws4_auth_completion(); + if (ret_auth) + return ret_auth; + } + return ret; +} + int RGWPutACLs_ObjStore_S3::get_policy_from_state(RGWRados *store, struct req_state *s, stringstream& ss) { RGWAccessControlPolicy_S3 s3policy(s->cct); diff --git a/src/rgw/rgw_rest_s3.h b/src/rgw/rgw_rest_s3.h index e7c500c7451e..9fd63b447da1 100644 --- a/src/rgw/rgw_rest_s3.h +++ b/src/rgw/rgw_rest_s3.h @@ -226,6 +226,7 @@ public: int get_policy_from_state(RGWRados *store, struct req_state *s, stringstream& ss); void send_response(); + int get_params(); }; class RGWGetCORS_ObjStore_S3 : public RGWGetCORS_ObjStore {