]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephx: don't check signature if MSG_AUTH feature isn't present
authorSage Weil <sage@inktank.com>
Mon, 29 Oct 2012 22:48:15 +0000 (15:48 -0700)
committerSage Weil <sage@inktank.com>
Mon, 29 Oct 2012 22:48:15 +0000 (15:48 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/auth/cephx/CephxSessionHandler.cc

index 31b219e153f172381e09daf8b1c80d4674b60dee..460e2526e10e2dd6255407b2020244bc419ad977 100644 (file)
@@ -81,6 +81,11 @@ int CephxSessionHandler::check_message_signature(Message *m)
     return 0;
   }
 
+  if ((features & CEPH_FEATURE_MSG_AUTH) == 0) {
+    // it's fine, we didn't negotiate this feature.
+    return 0;
+  }
+
   signatures_checked++;
 
   ldout(cct, 10) << "check_message_signature: seq # = " << m->get_seq() << " front_crc_ = " << footer.front_crc