From: yangruifeng Date: Mon, 19 Oct 2015 12:08:12 +0000 (-0400) Subject: mon: should not set isvalid = true when cephx_verify_authorizer return false X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8fb306c3f1dde17e0b912ecd96619620e61289c1;p=ceph.git mon: should not set isvalid = true when cephx_verify_authorizer return false Fixes: #13525 Signed-off-by: Ruifeng Yang (cherry picked from commit c7f75b8f7c0a773148ec16141941efd00ee76626) --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 339fd3e6b834a..a3356dd635c35 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -4161,9 +4161,9 @@ bool Monitor::ms_verify_authorizer(Connection *con, int peer_type, CephXServiceTicketInfo auth_ticket_info; if (authorizer_data.length()) { - int ret = cephx_verify_authorizer(g_ceph_context, &keyring, iter, + bool ret = cephx_verify_authorizer(g_ceph_context, &keyring, iter, auth_ticket_info, authorizer_reply); - if (ret >= 0) { + if (ret) { session_key = auth_ticket_info.session_key; isvalid = true; } else {