From: Yehuda Sadeh Date: Wed, 6 Mar 2013 18:25:52 +0000 (-0800) Subject: rgw: metadata list user, only show uids X-Git-Tag: v0.67-rc1~128^2~187 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0cccd7c6c3df5098e3e3d2661d8756f4eb08a478;p=ceph.git rgw: metadata list user, only show uids don't show unrelated object names Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc index 97847766f47..f194f1ee355 100644 --- a/src/rgw/rgw_user.cc +++ b/src/rgw/rgw_user.cc @@ -2294,8 +2294,24 @@ public: RGWRados *store = info->store; - return store->list_raw_objects(store->zone.user_uid_pool, no_filter, - max, info->ctx, keys, truncated); + list unfiltered_keys; + + int ret = store->list_raw_objects(store->zone.user_uid_pool, no_filter, + max, info->ctx, unfiltered_keys, truncated); + if (ret < 0) + return ret; + + // now filter out the buckets entries + list::iterator iter; + for (iter = unfiltered_keys.begin(); iter != unfiltered_keys.end(); ++iter) { + string& k = *iter; + + if (k.find(".buckets") == string::npos) { + keys.push_back(k); + } + } + + return 0; } void list_keys_complete(void *handle) {