summaryrefslogtreecommitdiffstats
path: root/src/rgw
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2013-12-06 20:24:06 +0100
committerYehuda Sadeh <yehuda@inktank.com>2013-12-06 20:24:06 +0100
commit516788d15b383354c605dd0c40e3e3f1192921a0 (patch)
tree3a2f73126f6613e140e29ae8f668763bc7f446f0 /src/rgw
parentMerge pull request #901 from dachary/wip-crush-unittest (diff)
parentMerge pull request #900 from ceph/wip-mon-mds-trim (diff)
downloadceph-516788d15b383354c605dd0c40e3e3f1192921a0.tar.xz
ceph-516788d15b383354c605dd0c40e3e3f1192921a0.zip
Merge remote-tracking branch 'origin/next'
Diffstat (limited to 'src/rgw')
-rw-r--r--src/rgw/rgw_acl_s3.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rgw/rgw_acl_s3.cc b/src/rgw/rgw_acl_s3.cc
index 6007d41077a..71c86826676 100644
--- a/src/rgw/rgw_acl_s3.cc
+++ b/src/rgw/rgw_acl_s3.cc
@@ -454,8 +454,10 @@ int RGWAccessControlPolicy_S3::rebuild(RGWRados *store, ACLOwner *owner, RGWAcce
return -EINVAL;
ACLOwner *requested_owner = static_cast<ACLOwner_S3 *>(find_first("Owner"));
- if (requested_owner && requested_owner->get_id().compare(owner->get_id()) != 0) {
- return -EPERM;
+ if (requested_owner) {
+ const string& requested_id = requested_owner->get_id();
+ if (!requested_id.empty() && requested_id.compare(owner->get_id()) != 0)
+ return -EPERM;
}
RGWUserInfo owner_info;