From: Casey Bodley Date: Thu, 11 Jan 2024 15:28:01 +0000 (-0500) Subject: rgw: fix use of creds in forward_iam_request() X-Git-Tag: v19.1.0~508^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=209e3ed6f11af0cc1dde070e21e0867412e7d5e9;p=ceph.git rgw: fix use of creds in forward_iam_request() variable `creds` was moved into the `RGWRESTConn` constructor before being passed into `forward_iam_request()`. change `forward_iam_request()` so it uses the member variable from the constructor instead of taking it as an argument Fixes: https://tracker.ceph.com/issues/63994 Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_rest_conn.cc b/src/rgw/rgw_rest_conn.cc index a9a6bc7c56cb1..235de2b7363f6 100644 --- a/src/rgw/rgw_rest_conn.cc +++ b/src/rgw/rgw_rest_conn.cc @@ -109,7 +109,7 @@ int RGWRESTConn::forward(const DoutPrefixProvider *dpp, const rgw_user& uid, con return req.forward_request(dpp, key, info, max_response, inbl, outbl, y); } -int RGWRESTConn::forward_iam_request(const DoutPrefixProvider *dpp, const RGWAccessKey& key, const req_info& info, obj_version *objv, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y) +int RGWRESTConn::forward_iam_request(const DoutPrefixProvider *dpp, const req_info& info, obj_version *objv, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y) { string url; int ret = get_url(url); diff --git a/src/rgw/rgw_rest_conn.h b/src/rgw/rgw_rest_conn.h index 4e3c88af219b7..26e71bef38a93 100644 --- a/src/rgw/rgw_rest_conn.h +++ b/src/rgw/rgw_rest_conn.h @@ -128,7 +128,7 @@ public: int forward(const DoutPrefixProvider *dpp, const rgw_user& uid, const req_info& info, obj_version *objv, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y); /* sync request */ - int forward_iam_request(const DoutPrefixProvider *dpp, const RGWAccessKey& key, const req_info& info, obj_version *objv, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y); + int forward_iam_request(const DoutPrefixProvider *dpp, const req_info& info, obj_version *objv, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y); /* async requests */ diff --git a/src/rgw/rgw_rest_role.cc b/src/rgw/rgw_rest_role.cc index 2b8d3920aceab..83c8fb902c166 100644 --- a/src/rgw/rgw_rest_role.cc +++ b/src/rgw/rgw_rest_role.cc @@ -59,7 +59,7 @@ int forward_iam_request_to_master(const DoutPrefixProvider* dpp, std::move(creds), zg->second.id, zg->second.api_name}; bufferlist outdata; constexpr size_t max_response_size = 128 * 1024; // we expect a very small response - int ret = conn.forward_iam_request(dpp, creds, req, nullptr, max_response_size, + int ret = conn.forward_iam_request(dpp, req, nullptr, max_response_size, &indata, &outdata, y); if (ret < 0) { return ret;