WRITE_CLASS_ENCODER(EntityAuth)
static inline ostream& operator<<(ostream& out, const EntityAuth& a) {
- return out << "auth(key=" << a.key << " with " << a.caps.size() << " caps)";
+ out << "auth(key=" << a.key;
+ if (a.auth_uid != CEPH_AUTH_UID_DEFAULT)
+ out << " uid=" << a.auth_uid;
+ return out << " with " << a.caps.size() << " caps)";
}
struct AuthCapsInfo {
__u64 auth_uid;
bufferlist caps;
- AuthCapsInfo() : allow_all(false) {}
+ AuthCapsInfo() : allow_all(false), auth_uid(CEPH_AUTH_UID_DEFAULT){}
void encode(bufferlist& bl) const {
__u8 struct_v = 2;
for (map<EntityName, EntityAuth>::iterator p = keys.begin();
p != keys.end();
++p) {
- out << p->first << std::endl;
+ out << p->first << "\t" << p->second.auth_uid << std::endl;
out << "\tkey: " << p->second.key << std::endl;
for (map<string, bufferlist>::iterator q = p->second.caps.begin();
if (iter == secrets.end())
return false;
+ dout(0) << "get_caps: auth_uid=" << iter->second.auth_uid << dendl;
+ caps_info.auth_uid = iter->second.auth_uid;
+
dout(0) << "get_secret: num of caps=" << iter->second.caps.size() << dendl;
map<string, bufferlist>::iterator capsiter = iter->second.caps.find(type);
if (capsiter != iter->second.caps.end()) {
caps_info.caps = capsiter->second;
}
- caps_info.auth_uid = iter->second.auth_uid;
return true;
}