diff options
author | Bryan Ischo <bryan@ischo.com> | 2011-09-28 01:12:32 -0700 |
---|---|---|
committer | Bryan Ischo <bryan@ischo.com> | 2011-09-28 01:12:32 -0700 |
commit | 5465b5523a323f239cfc0f724afc1f900e24fcc4 (patch) | |
tree | ca57bbcefa3d26dc1e5ff9912d531b1a08707170 /src/acl.c | |
parent | 73366b8e549386c6183c64e3b47b913849bcddcf (diff) | |
download | ceph-libs3-5465b5523a323f239cfc0f724afc1f900e24fcc4.tar.gz |
Incorporated change from Yehuda Sadeh which allows runtime
customization of the S3 server to talk to, with additional small
improvements, enhanced by me to support multiple S3 hosts in the same
runtime.
Diffstat (limited to 'src/acl.c')
-rw-r--r-- | src/acl.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -122,7 +122,8 @@ void S3_get_acl(const S3BucketContext *bucketContext, const char *key, RequestParams params = { HttpRequestTypeGET, // httpRequestType - { bucketContext->bucketName, // bucketName + { bucketContext->hostName, // hostName + bucketContext->bucketName, // bucketName bucketContext->protocol, // protocol bucketContext->uriStyle, // uriStyle bucketContext->accessKeyId, // accessKeyId @@ -195,16 +196,13 @@ static S3Status generateAclXmlDocument(const char *ownerId, const char *grantee; switch (grant->granteeType) { case S3GranteeTypeAllAwsUsers: - grantee = "http://acs.amazonaws.com/groups/global/" - "AuthenticatedUsers"; + grantee = ACS_GROUP_AWS_USERS; break; case S3GranteeTypeAllUsers: - grantee = "http://acs.amazonaws.com/groups/global/" - "AllUsers"; + grantee = ACS_GROUP_ALL_USERS; break; default: - grantee = "http://acs.amazonaws.com/groups/s3/" - "LogDelivery"; + grantee = ACS_GROUP_LOG_DELIVERY; break; } append("Group\"><URI>%s</URI>", grantee); @@ -322,7 +320,8 @@ void S3_set_acl(const S3BucketContext *bucketContext, const char *key, RequestParams params = { HttpRequestTypePUT, // httpRequestType - { bucketContext->bucketName, // bucketName + { bucketContext->hostName, // hostName + bucketContext->bucketName, // bucketName bucketContext->protocol, // protocol bucketContext->uriStyle, // uriStyle bucketContext->accessKeyId, // accessKeyId |