} else if (i == "gss") {
v->push_back(CEPH_AUTH_GSS);
} else {
- v->push_back(CEPH_AUTH_UNKNOWN);
lderr(cct) << "WARNING: unknown auth protocol defined: " << i << dendl;
}
}
if (v->empty()) {
- lderr(cct) << "WARNING: no auth protocol defined, use 'cephx' by default"
- << dendl;
- v->push_back(CEPH_AUTH_CEPHX);
+ lderr(cct) << "WARNING: no auth protocol defined" << dendl;
}
ldout(cct,20) << __func__ << " " << s << " -> " << *v << dendl;
}
} else if (i == "secure") {
v->push_back(CEPH_CON_MODE_SECURE);
} else {
- v->push_back(CEPH_CON_MODE_UNKNOWN);
lderr(cct) << "WARNING: unknown connection mode " << i << dendl;
}
}
if (v->empty()) {
- lderr(cct) << "WARNING: no connection modes defined, use 'crc' by default"
- << dendl;
- v->push_back(CEPH_CON_MODE_CRC);
+ lderr(cct) << "WARNING: no connection modes defined" << dendl;
}
ldout(cct,20) << __func__ << " " << s << " -> " << *v << dendl;
}
if (auth_method < 0) {
vector<uint32_t> as;
auth_registry->get_supported_methods(con->get_peer_type(), &as);
+ if (as.empty()) {
+ return -EACCES;
+ }
auth_method = as.front();
}
*method = auth_method;
preferred_modes);
ldout(cct,10) << __func__ << " method " << *method
<< " preferred_modes " << *preferred_modes << dendl;
+ if (preferred_modes->empty()) {
+ return -EACCES;
+ }
if (auth) {
auth.reset();