From: hechuang Date: Wed, 3 Jan 2018 07:45:53 +0000 (+0800) Subject: rgw: fix the return type is wrong X-Git-Tag: v13.0.2~627^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F19773%2Fhead;p=ceph.git rgw: fix the return type is wrong invalid acl header will also be successful Signed-off-by: hechuang --- diff --git a/src/rgw/rgw_acl_s3.cc b/src/rgw/rgw_acl_s3.cc index 43a961d1860..5f026ff3547 100644 --- a/src/rgw/rgw_acl_s3.cc +++ b/src/rgw/rgw_acl_s3.cc @@ -454,14 +454,17 @@ static const s3_acl_header acl_header_perms[] = { int RGWAccessControlPolicy_S3::create_from_headers(RGWRados *store, const RGWEnv *env, ACLOwner& _owner) { std::list grants; + int r = 0; for (const struct s3_acl_header *p = acl_header_perms; p->rgw_perm; p++) { - if (parse_acl_header(store, env, p, grants) < 0) - return false; + r = parse_acl_header(store, env, p, grants); + if (r < 0) { + return r; + } } RGWAccessControlList_S3& _acl = static_cast(acl); - int r = _acl.create_from_grants(grants); + r = _acl.create_from_grants(grants); owner = _owner;