| 7424 | } |
| 7425 | |
| 7426 | void OSD::handle_command(MCommand *m) |
| 7427 | { |
| 7428 | ConnectionRef con = m->get_connection(); |
| 7429 | auto session = ceph::ref_cast<Session>(con->get_priv()); |
| 7430 | if (!session) { |
| 7431 | con->send_message(new MCommandReply(m, -EACCES)); |
| 7432 | m->put(); |
| 7433 | return; |
| 7434 | } |
| 7435 | if (!session->caps.allow_all()) { |
| 7436 | con->send_message(new MCommandReply(m, -EACCES)); |
| 7437 | m->put(); |
| 7438 | return; |
| 7439 | } |
| 7440 | cct->get_admin_socket()->queue_tell_command(m); |
| 7441 | m->put(); |
| 7442 | } |
| 7443 | |
| 7444 | namespace { |
| 7445 | class unlock_guard { |
nothing calls this directly
no test coverage detected