]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: index swift keys appropriately
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 7 Jan 2015 21:56:14 +0000 (13:56 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Wed, 14 Jan 2015 23:51:43 +0000 (15:51 -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>
(cherry picked from commit 478629bd2f3f32afbe6e93eaebb8a8fa01af356f)

src/rgw/rgw_json_enc.cc

index a1986782d11124c362c1fcdc722c5084c1d23006..c0f8311a5eb3cc3d4775c9b6e4717e857a5452bf 100644 (file)
@@ -429,7 +429,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)