MCPcopy Create free account
hub / github.com/ceph/ceph / get_auth_request

Method get_auth_request

src/mon/Monitor.cc:6355–6378  ·  view source on GitHub ↗

AuthClient methods -- for mon <-> mon communication

Source from the content-addressed store, hash-verified

6353
6354// AuthClient methods -- for mon <-> mon communication
6355int Monitor::get_auth_request(
6356 Connection *con,
6357 AuthConnectionMeta *auth_meta,
6358 uint32_t *method,
6359 vector<uint32_t> *preferred_modes,
6360 bufferlist *out)
6361{
6362 std::scoped_lock l(auth_lock);
6363 if (con->get_peer_type() != CEPH_ENTITY_TYPE_MON &&
6364 con->get_peer_type() != CEPH_ENTITY_TYPE_MGR) {
6365 return -EACCES;
6366 }
6367 AuthAuthorizer *auth;
6368 if (!get_authorizer(con->get_peer_type(), &auth)) {
6369 return -EACCES;
6370 }
6371 auth_meta->authorizer.reset(auth);
6372 auth_registry.get_supported_modes(con->get_peer_type(),
6373 auth->protocol,
6374 preferred_modes);
6375 *method = auth->protocol;
6376 *out = auth->bl;
6377 return 0;
6378}
6379
6380int Monitor::handle_auth_reply_more(
6381 Connection *con,

Callers 2

send_auth_requestMethod · 0.45
send_connect_messageMethod · 0.45

Calls 3

get_supported_modesMethod · 0.80
get_peer_typeMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected