Fixes: https://tracker.ceph.com/issues/23776
Signed-off-by: Nathan Cutler <ncutler@suse.com>
WRITE_CLASS_ENCODER(EntityAuth)
static inline ostream& operator<<(ostream& out, const EntityAuth& a) {
- return out << "auth(key=" << a.key << " with " << a.caps.size() << " caps)";
+ return out << "auth(key=" << a.key << ")";
}
struct AuthCapsInfo {
// keyring --------
bool modified = false;
+ bool added_entity = false;
KeyRing keyring;
bufferlist bl;
}
keyring.add(ename, eauth);
modified = true;
- cout << "added entity " << ename << " auth " << eauth << std::endl;
+ cout << "added entity " << ename << " " << eauth << std::endl;
+ added_entity = true;
}
if (!caps_fn.empty()) {
ConfFile cf;
keyring.set_caps(ename, caps);
modified = true;
}
+ if (added_entity && caps.size() > 0) {
+ cout << "added " << caps.size() << " caps to entity " << ename << std::endl;
+ }
// read commands
if (list) {