From: brian Date: Wed, 23 Sep 2015 14:49:36 +0000 (-0500) Subject: rgw: fix modification to index attrs when setting acls X-Git-Tag: v10.0.1~113^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7496741ebbd75b74d5ffeca5341cccb2318176e6;p=ceph.git rgw: fix modification to index attrs when setting acls Fixes: #12955 - add ACL change after initial population - populate bufferlist with object attributes Signed-off-by: Brian Felton --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index ca41a25ad983..8633036ef9e4 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -2799,8 +2799,17 @@ void RGWPutACLs::execute() new_policy.encode(bl); obj = rgw_obj(s->bucket, s->object); map attrs; - attrs[RGW_ATTR_ACL] = bl; + store->set_atomic(s->obj_ctx, obj); + + if (!s->object.empty()) { + ret = get_obj_attrs(store, s, obj, attrs); + if (ret < 0) + return; + } + + attrs[RGW_ATTR_ACL] = bl; + if (!s->object.empty()) { ret = store->set_attrs(s->obj_ctx, obj, attrs, NULL, ptracker); } else {