]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
auth: tolerate bad authenticator replies (retry instead of crashing)
authorSage Weil <sage@newdream.net>
Thu, 4 Feb 2010 22:24:23 +0000 (14:24 -0800)
committerSage Weil <sage@newdream.net>
Thu, 4 Feb 2010 22:24:23 +0000 (14:24 -0800)
src/auth/cephx/CephxProtocol.cc
src/mds/MDS.cc
src/osd/OSD.cc

index eb5e644ab48eb3d24667681df4a666ec91d7ce18..c9cff04e782e7b43f041c9d8aab4ea5b42e05fc1 100644 (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;
   }
 
index 878b58b652610560659ce7e6c07c6a50040fdbea..bc0080ad9f1483d61a0a2bcf22da3595ce41fca6 100644 (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)
index 2da4ec9f00b617429bde8f53c77c6521401c0a5b..6fd22cf97654e232fe26fa826526a4561e320028 100644 (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;