diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/rgw/rgw_acl_s3.cc | 13 | ||||
-rw-r--r-- | src/rgw/rgw_acl_s3.h | 1 | ||||
-rw-r--r-- | src/rgw/rgw_rest_s3.cc | 2 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/rgw/rgw_acl_s3.cc b/src/rgw/rgw_acl_s3.cc index 1e57d905389..37d7142c001 100644 --- a/src/rgw/rgw_acl_s3.cc +++ b/src/rgw/rgw_acl_s3.cc @@ -335,6 +335,7 @@ static int read_aclowner_by_email(const DoutPrefixProvider* dpp, } static int parse_grantee_str(const DoutPrefixProvider* dpp, + optional_yield y, rgw::sal::Driver* driver, const std::string& grantee_str, const s3_acl_header* perm, @@ -352,7 +353,7 @@ static int parse_grantee_str(const DoutPrefixProvider* dpp, if (strcasecmp(id_type.c_str(), "emailAddress") == 0) { ACLOwner owner; - ret = read_aclowner_by_email(dpp, null_yield, driver, id_val, owner); + ret = read_aclowner_by_email(dpp, y, driver, id_val, owner); if (ret < 0) return ret; @@ -360,7 +361,7 @@ static int parse_grantee_str(const DoutPrefixProvider* dpp, } else if (strcasecmp(id_type.c_str(), "id") == 0) { ACLOwner owner; owner.id = parse_owner(id_val); - ret = read_owner_display_name(dpp, null_yield, driver, + ret = read_owner_display_name(dpp, y, driver, owner.id, owner.display_name); if (ret < 0) return ret; @@ -379,7 +380,8 @@ static int parse_grantee_str(const DoutPrefixProvider* dpp, return 0; } -static int parse_acl_header(const DoutPrefixProvider* dpp, rgw::sal::Driver* driver, +static int parse_acl_header(const DoutPrefixProvider* dpp, + optional_yield y, rgw::sal::Driver* driver, const RGWEnv& env, const s3_acl_header* perm, RGWAccessControlList& acl) { @@ -390,7 +392,7 @@ static int parse_acl_header(const DoutPrefixProvider* dpp, rgw::sal::Driver* dri for (std::string_view grantee : ceph::split(hacl, ",")) { ACLGrant grant; - int ret = parse_grantee_str(dpp, driver, std::string{grantee}, perm, grant); + int ret = parse_grantee_str(dpp, y, driver, std::string{grantee}, perm, grant); if (ret < 0) return ret; @@ -685,6 +687,7 @@ int create_canned_acl(const ACLOwner& owner, } int create_policy_from_headers(const DoutPrefixProvider* dpp, + optional_yield y, rgw::sal::Driver* driver, const ACLOwner& owner, const RGWEnv& env, @@ -694,7 +697,7 @@ int create_policy_from_headers(const DoutPrefixProvider* dpp, auto& acl = policy.get_acl(); for (const s3_acl_header* p = acl_header_perms; p->rgw_perm; p++) { - int r = parse_acl_header(dpp, driver, env, p, acl); + int r = parse_acl_header(dpp, y, driver, env, p, acl); if (r < 0) { return r; } diff --git a/src/rgw/rgw_acl_s3.h b/src/rgw/rgw_acl_s3.h index 2341461783f..22b34c21f45 100644 --- a/src/rgw/rgw_acl_s3.h +++ b/src/rgw/rgw_acl_s3.h @@ -39,6 +39,7 @@ int create_canned_acl(const ACLOwner& owner, /// Construct a policy from x-amz-grant-* request headers. int create_policy_from_headers(const DoutPrefixProvider* dpp, + optional_yield y, rgw::sal::Driver* driver, const ACLOwner& owner, const RGWEnv& env, diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 0f77c2f9b01..24bb114987c 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -2381,7 +2381,7 @@ static int create_s3_policy(req_state *s, rgw::sal::Driver* driver, if (!s->canned_acl.empty()) return -ERR_INVALID_REQUEST; - return rgw::s3::create_policy_from_headers(s, driver, owner, + return rgw::s3::create_policy_from_headers(s, s->yield, driver, owner, *s->info.env, policy); } |