mirror of
https://github.com/ceph/ceph
synced 2024-12-26 21:43:10 +00:00
mon: Add a Session operator<<, use it in OSDMonitor
This commit is contained in:
parent
7af73ac84b
commit
390258a73f
@ -1007,6 +1007,7 @@ int OSDMonitor::prepare_new_pool(MPoolOp *m)
|
||||
{
|
||||
//check permissions for the auid, then pass off to next function
|
||||
Session * session = (Session *) m->get_connection()->get_priv();
|
||||
dout(10) << "prepare_new_pool from Session " << std::endl << session << dendl;
|
||||
if (m->auid) {
|
||||
if(session->caps.check_privileges(PAXOS_OSDMAP, MON_CAP_W, m->auid)) {
|
||||
return prepare_new_pool(m->name, m->auid);
|
||||
|
@ -126,4 +126,12 @@ struct SessionMap {
|
||||
}
|
||||
};
|
||||
|
||||
inline ostream& operator<<(ostream& out, const Session *s)
|
||||
{
|
||||
out << "Session: " << s->inst << " is "
|
||||
<< (s->closed ? "closed" : "open");
|
||||
out << s->caps;
|
||||
return out;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user