]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: catch up aws4 with the new features 4943/head
authorJavier M. Mellid <jmunhoz@igalia.com>
Sun, 14 Feb 2016 12:26:02 +0000 (13:26 +0100)
committerJavier M. Mellid <jmunhoz@igalia.com>
Sun, 14 Feb 2016 12:26:02 +0000 (13:26 +0100)
Fix pending conflicts after massive merging. It catches up with SLO, bucket
website, bulk deletes and payment request features.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
src/rgw/rgw_common.h
src/rgw/rgw_op.cc
src/rgw/rgw_rest_s3.cc

index 6f28bb1660275450673cdb32bf77f18de66de113..f94c0a485ee2f0333b306125a7bb5ceda37333f6 100644 (file)
@@ -381,6 +381,8 @@ enum RGWOpType {
   RGW_OP_GET_BUCKET_LOGGING,
   RGW_OP_GET_BUCKET_VERSIONING,
   RGW_OP_SET_BUCKET_VERSIONING,
+  RGW_OP_GET_BUCKET_WEBSITE,
+  RGW_OP_SET_BUCKET_WEBSITE,
   RGW_OP_STAT_BUCKET,
   RGW_OP_CREATE_BUCKET,
   RGW_OP_DELETE_BUCKET,
@@ -398,15 +400,18 @@ enum RGWOpType {
   RGW_OP_PUT_CORS,
   RGW_OP_DELETE_CORS,
   RGW_OP_OPTIONS_CORS,
+  RGW_OP_GET_REQUEST_PAYMENT,
+  RGW_OP_SET_REQUEST_PAYMENT,
   RGW_OP_INIT_MULTIPART,
   RGW_OP_COMPLETE_MULTIPART,
   RGW_OP_ABORT_MULTIPART,
   RGW_OP_LIST_MULTIPART,
   RGW_OP_LIST_BUCKET_MULTIPARTS,
   RGW_OP_DELETE_MULTI_OBJ,
+  RGW_OP_BULK_DELETE,
 
   /* rgw specific */
-  RGW_OP_ADMIN_SET_METADATA,
+  RGW_OP_ADMIN_SET_METADATA
 };
 
 class RGWAccessControlPolicy;
@@ -1771,7 +1776,7 @@ extern bool verify_object_permission(struct req_state *s, int perm);
  * by converting %-escaped strings into characters, etc*/
 extern void rgw_uri_escape_char(char c, string& dst);
 extern bool url_decode(const string& src_str, string& dest_str, bool in_query = false);
-extern void url_encode(const string& src, string& dst, bool in_query = false);
+extern void url_encode(const string& src, string& dst);
 
 /* destination should be CEPH_CRYPTO_HMACSHA1_DIGESTSIZE bytes long */
 extern void calc_hmac_sha1(const char *key, int key_len,
index 49cfc4dab89e98586587652cead1193292e1fa7a..4ff45120076c09ca8ca9a0a58db7b5ed22f12833 100644 (file)
@@ -2361,7 +2361,7 @@ void RGWPutObj::execute()
 
     /* verify signature */
 
-    if (s->aws4_auth_signature != s->aws4_auth_new_signature) {
+    if (s->aws4_auth->signature != s->aws4_auth->new_signature) {
       op_ret = -ERR_SIGNATURE_NO_MATCH;
       ldout(s->cct, 20) << "delayed aws4 auth failed" << dendl;
       goto done;
index e977166e47f8570a9d1a85909dcafe5147bb845a..72afee8800c1ca8656575d5e17da7c409ca83679 100644 (file)
@@ -3291,7 +3291,8 @@ int RGW_Auth_S3::authorize_v4(RGWRados *store, struct req_state *s)
     s->system_request = true;
     dout(20) << "system request" << dendl;
     s->info.args.set_system();
-    string effective_uid = s->info.args.get(RGW_SYS_PARAM_PREFIX "uid");
+    string euid = s->info.args.get(RGW_SYS_PARAM_PREFIX "uid");
+    rgw_user effective_uid(euid);
     RGWUserInfo effective_user;
     if (!effective_uid.empty()) {
       int ret = rgw_get_user_info_by_uid(store, effective_uid, effective_user);