]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: index swift keys appropriately 3316/head
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 7 Jan 2015 21:56:14 +0000 (13:56 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Wed, 7 Jan 2015 22:20:45 +0000 (14:20 -0800)
Fixes: #10471
Backport: firefly, giant

We need to index the swift keys by the full uid:subuser when decoding
the json representation, to keep it in line with how we store it when
creating it through other mechanism.

Reported-by: hemant burman <hemant.burman@gmail.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_json_enc.cc

index b70b613f49a996b4e0effcbc9992b613e89eda23..cd731b78a5920a36a14055e8baf0a563ff2e1c41 100644 (file)
@@ -431,7 +431,7 @@ static void decode_swift_keys(map<string, RGWAccessKey>& m, JSONObj *o)
 {
   RGWAccessKey k;
   k.decode_json(o, true);
-  m[k.subuser] = k;
+  m[k.id] = k;
 }
 
 static void decode_subusers(map<string, RGWSubUser>& m, JSONObj *o)