Fix incorrect result when attempting to fetch an ACL for a
bucket that does not exist.
This change leads to a NoSuchBucket error result when an ACL is
requested from a non-existent bucket. A NoSuchKey error result
iss already seen when the target was an object.
Fixes: https://tracker.ceph.com/issues/38116
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
}
perm = verify_object_permission(this, s, iam_action);
} else {
+ if (!s->bucket_exists) {
+ return -ERR_NO_SUCH_BUCKET;
+ }
perm = verify_bucket_permission(this, s, rgw::IAM::s3GetBucketAcl);
}
if (!perm)