auth: tolerate bad authenticator replies (retry instead of crashing)

This commit is contained in:
Sage Weil 2010-02-04 14:24:23 -08:00
parent 91bf3e3cc9
commit 035389a4c5
3 changed files with 9 additions and 4 deletions

View File

@ -415,8 +415,13 @@ bool CephXAuthorizer::verify_reply(bufferlist::iterator& indata)
{
CephXAuthorizeReply reply;
if (decode_decrypt(reply, session_key, indata) < 0) {
dout(0) << "verify_authorizer_reply coudln't decrypt with " << session_key << dendl;
try {
if (decode_decrypt(reply, session_key, indata) < 0) {
dout(0) << "verify_authorizer_reply coudln't decrypt with " << session_key << dendl;
return false;
}
} catch (buffer::error *e) {
dout(0) << "verify_authorizer_reply exception in decode_decrypt with " << session_key << dendl;
return false;
}

View File

@ -1210,7 +1210,7 @@ bool MDS::ms_dispatch(Message *m)
bool MDS::ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool force_new)
{
dout(0) << "MDS::ms_get_authorizer type=" << dest_type << dendl;
dout(10) << "MDS::ms_get_authorizer type=" << ceph_entity_type_name(dest_type) << dendl;
/* monitor authorization is being handled on different layer */
if (dest_type == CEPH_ENTITY_TYPE_MON)

View File

@ -1568,7 +1568,7 @@ bool OSD::ms_dispatch(Message *m)
bool OSD::ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool force_new)
{
dout(0) << "OSD::ms_get_authorizer type=" << dest_type << dendl;
dout(10) << "OSD::ms_get_authorizer type=" << ceph_entity_type_name(dest_type) << dendl;
if (dest_type == CEPH_ENTITY_TYPE_MON)
return true;