]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix obj copied from remote gateway acl full_control issue 17478/head
authorJiaying Ren <jiaying.ren@umcloud.com>
Thu, 10 Aug 2017 02:57:13 +0000 (10:57 +0800)
committerNathan Cutler <ncutler@suse.com>
Tue, 5 Sep 2017 09:47:28 +0000 (11:47 +0200)
commitce2a181834cf60f9d03bbcf849ae72a740bb10a9
treeecdf1971beace1b38fb9e7dad39ae08abc0213a1
parent823585311c41729309809690a7df5cb83c4ece12
rgw: fix obj copied from remote gateway acl full_control issue

This part of the code is commit in
ea3efca

When copy a object to a remote gateway, the check processing which is
done by
"Bitwise And" between source object's acl elements and
grants_headers_def array elements
will be done to produce the target object's acl elements.

So when the full_control is the first element of grants_headers_def, no
matter the
source object's acl element permission field is write or read, the
result of
bitwise and will always be true, then call grants_by_type_add_one_grant
with
check_perm which is full_control, all of the permission field of the
target object's
acl elements will be full_control.

Fixes: http://tracker.ceph.com/issues/20658
Signed-off-by: Enming Zhang <enming.zhang@umcloud.com>
(cherry picked from commit 6bb2ed24ad175005e7ebd187166bb8735761493c)
src/rgw/rgw_rest_client.cc