}
}
-int MDSDaemon::ms_handle_authentication(Connection *con)
+int MDSDaemon::ms_handle_fast_authentication(Connection *con)
{
/* N.B. without mds_lock! */
MDSAuthCaps caps;
private:
bool ms_dispatch2(const ref_t<Message> &m) override;
- int ms_handle_authentication(Connection *con) override;
+ int ms_handle_fast_authentication(Connection *con) override;
void ms_handle_accept(Connection *con) override;
void ms_handle_connect(Connection *con) override;
bool ms_handle_reset(Connection *con) override;
return msgr->get_myaddrs();
}
-int DaemonServer::ms_handle_authentication(Connection *con)
+int DaemonServer::ms_handle_fast_authentication(Connection *con)
{
auto s = ceph::make_ref<MgrSession>(cct);
con->set_priv(s);
~DaemonServer() override;
bool ms_dispatch2(const ceph::ref_t<Message>& m) override;
- int ms_handle_authentication(Connection *con) override;
+ int ms_handle_fast_authentication(Connection *con) override;
bool ms_handle_reset(Connection *con) override;
void ms_handle_remote_reset(Connection *con) override {}
bool ms_handle_refused(Connection *con) override;
}
if (ret > 0) {
if (!s->authenticated &&
- mon.ms_handle_authentication(s->con.get()) > 0) {
+ mon.ms_handle_fast_authentication(s->con.get()) > 0) {
finished = true;
}
ret = 0;
// for some channels prior to nautilus (osd heartbeat), we
// tolerate the lack of an authorizer.
if (!con->get_messenger()->require_authorizer) {
- handle_authentication_dispatcher->ms_handle_authentication(con);
+ handle_authentication_dispatcher->ms_handle_fast_authentication(con);
return 1;
}
return -EACCES;
&auth_meta->connection_secret,
ac);
if (isvalid) {
- handle_authentication_dispatcher->ms_handle_authentication(con);
+ handle_authentication_dispatcher->ms_handle_fast_authentication(con);
return 1;
}
if (!more && !was_challenge && auth_meta->authorizer_challenge) {
&auth_meta->connection_secret,
&auth_meta->authorizer_challenge);
if (isvalid) {
- ms_handle_authentication(con);
+ ms_handle_fast_authentication(con);
return 1;
}
if (!more && !was_challenge && auth_meta->authorizer_challenge) {
}
if (r > 0 &&
!s->authenticated) {
- ms_handle_authentication(con);
+ ms_handle_fast_authentication(con);
}
dout(30) << " r " << r << " reply:\n";
}
}
-int Monitor::ms_handle_authentication(Connection *con)
+int Monitor::ms_handle_fast_authentication(Connection *con)
{
if (con->get_peer_type() == CEPH_ENTITY_TYPE_MON) {
// mon <-> mon connections need no Session, and setting one up
MonCap mon_caps;
bool get_authorizer(int dest_type, AuthAuthorizer **authorizer);
public: // for AuthMonitor msgr1:
- int ms_handle_authentication(Connection *con) override;
+ int ms_handle_fast_authentication(Connection *con) override;
private:
void ms_handle_accept(Connection *con) override;
bool ms_handle_reset(Connection *con) override;
/**
* handle successful authentication (msgr2)
*
- * Authenticated result/state will be attached to the Connection.
+ * Authenticated result/state will be attached to the Connection. This is
+ * called via the MonClient.
+ *
+ * Do not acquire locks in this method! It is considered "fast" delivery.
*
* return 1 for success
* return 0 for no action (let another Dispatcher handle it)
* return <0 for failure (failure to parse caps, for instance)
*/
- virtual int ms_handle_authentication(Connection *con) {
+ virtual int ms_handle_fast_authentication(Connection *con) {
return 0;
}
OID_EVENT_TRACE_WITH_MSG(m, "MS_FAST_DISPATCH_END", false);
}
-int OSD::ms_handle_authentication(Connection *con)
+int OSD::ms_handle_fast_authentication(Connection *con)
{
int ret = 0;
auto s = ceph::ref_cast<Session>(con->get_priv());
bool ms_handle_refused(Connection *con) override {
return osd->ms_handle_refused(con);
}
- int ms_handle_authentication(Connection *con) override {
+ int ms_handle_fast_authentication(Connection *con) override {
return true;
}
} heartbeat_dispatcher;
void ms_handle_connect(Connection *con) override;
void ms_handle_fast_connect(Connection *con) override;
void ms_handle_fast_accept(Connection *con) override;
- int ms_handle_authentication(Connection *con) override;
+ int ms_handle_fast_authentication(Connection *con) override;
bool ms_handle_reset(Connection *con) override;
void ms_handle_remote_reset(Connection *con) override {}
bool ms_handle_refused(Connection *con) override;
bool ms_handle_refused(Connection *con) override {
return false;
}
- int ms_handle_authentication(Connection *con) override {
+ int ms_handle_fast_authentication(Connection *con) override {
return 1;
}
};
bool ms_handle_reset(Connection *con) override { return true; }
void ms_handle_remote_reset(Connection *con) override {}
bool ms_handle_refused(Connection *con) override { return false; }
- int ms_handle_authentication(Connection *con) override {
+ int ms_handle_fast_authentication(Connection *con) override {
return 1;
}
};
//cerr << __func__ << " reply message=" << m << std::endl;
op_wq.queue(m);
}
- int ms_handle_authentication(Connection *con) override {
+ int ms_handle_fast_authentication(Connection *con) override {
return 1;
}
};
cond.notify_all();
}
- int ms_handle_authentication(Connection *con) override {
+ int ms_handle_fast_authentication(Connection *con) override {
return 1;
}
}
}
- int ms_handle_authentication(Connection *con) override {
+ int ms_handle_fast_authentication(Connection *con) override {
return 1;
}
void ms_fast_dispatch(Message *m) override {
ceph_abort();
}
- int ms_handle_authentication(Connection *con) override {
+ int ms_handle_fast_authentication(Connection *con) override {
return 1;
}
};